summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-29 23:53:13 -0700
committerJunio C Hamano <junkio@cox.net>2006-05-30 00:09:36 -0700
commit2186d566a6c2dfb2f168ae608bbb2e0e77122d7e (patch)
tree316a64641a2963517919562f7d3e28d135081474 /git-send-email.perl
parentce903018f1ed0283fdaa3de1ec3ad29fccf25c96 (diff)
downloadgit-2186d566a6c2dfb2f168ae608bbb2e0e77122d7e.tar.gz
send-email: do not pass bogus address to local sendmail binary
This makes t9001 test happy. Also fixes the warning on uninitialized $references variable again. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index d418d6c5d2..0e368fff0c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -387,7 +387,9 @@ X-Mailer: git-send-email $gitversion
my $pid = open my $sm, '|-';
defined $pid or die $!;
if (!$pid) {
- exec($smtp_server,'-i',@recipients) or die $!;
+ exec($smtp_server,'-i',
+ map { scalar extract_valid_address($_) }
+ @recipients) or die $!;
}
print $sm "$header\n$message";
close $sm or die $?;
@@ -420,7 +422,7 @@ X-Mailer: git-send-email $gitversion
}
$reply_to = $initial_reply_to;
-$references = $initial_reply_to;
+$references = $initial_reply_to || '';
make_message_id();
$subject = $initial_subject;