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>
This commit is contained in:
Junio C Hamano
2006-05-29 23:53:13 -07:00
parent ce903018f1
commit 2186d566a6
2 changed files with 17 additions and 8 deletions

View File

@ -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;