diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2007-04-25 19:37:17 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-25 21:01:40 -0700 |
commit | 8e3d436b0b5148bac11259bac55621e285eeb6c4 (patch) | |
tree | cb4c0a13e6237c35ac73940e9dabd48cb7cc8fd8 /git-send-email.perl | |
parent | 71c7da94218fbe36e64a326825ff30ef811b2a88 (diff) | |
download | git-8e3d436b0b5148bac11259bac55621e285eeb6c4.tar.gz |
Debugging cleanup improvements
The debug output is much more helpful if it has the parameters that were used.
Pull the sendmail parameters into a seperate array for that, and also include
similar data during the Net::SMTP case.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 50d45fe005..36795c8bdd 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -465,15 +465,15 @@ X-Mailer: git-send-email $gitversion $header .= join("\n", @xh) . "\n"; } + my @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients); + if ($dry_run) { # We don't want to send the email. } elsif ($smtp_server =~ m#^/#) { my $pid = open my $sm, '|-'; defined $pid or die $!; if (!$pid) { - exec($smtp_server,'-i', - map { extract_valid_address($_) } - @recipients) or die $!; + exec($smtp_server, @sendmail_parameters) or die $!; } print $sm "$header\n$message"; close $sm or die $?; @@ -493,8 +493,10 @@ X-Mailer: git-send-email $gitversion print (($dry_run ? "Dry-" : "")."OK. Log says:\nDate: $date\n"); if ($smtp) { print "Server: $smtp_server\n"; + print "MAIL FROM: $from\n"; + print "RCPT TO: ".join(',',@recipients)."\n"; } else { - print "Sendmail: $smtp_server\n"; + print "Sendmail: $smtp_server ".join(' ',@sendmail_parameters)."\n"; } print "From: $from\nSubject: $subject\nCc: $cc\nTo: $to\n\n"; if ($smtp) { |