send-email: Honour SMTP domain when using TLS
git-send-email sends two SMTP EHLOs when using TLS encryption, however only the first, unencrypted EHLO uses the SMTP domain that can be optionally specified by the user (--smtp-domain). This is because the call to hello() that produces the second, encrypted EHLO does not pass the SMTP domain as an argument, and hence a default of 'localhost.localdomain' is used instead. Fix by passing in the SMTP domain in this call. Signed-off-by: Matthew Daley <mattjd@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthew Daley committed
Oct 15, 2011 at 04:44 UTC
155b940f7a117e9bba1b62e442c9e6e5853a3c0d
1 file changed
+1
-1
git-send-email.perl
+1
-1
@@ -1015,7 +1015,7 @@ X-Mailer: git-send-email $gitversion
1015
$smtp_encryption = '';
1016
# Send EHLO again to receive fresh
1017
# supported commands
1018
- $smtp->hello();
1018
+ $smtp->hello($smtp_domain);
1019
} else {
1020
die "Server does not support STARTTLS! ".$smtp->message;
1021
}