Skip to content

Commit 155b940

Browse files
Matthew Daleygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 69cf7bf commit 155b940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ sub send_message {
10151015
$smtp_encryption = '';
10161016
# Send EHLO again to receive fresh
10171017
# supported commands
1018-
$smtp->hello();
1018+
$smtp->hello($smtp_domain);
10191019
} else {
10201020
die "Server does not support STARTTLS! ".$smtp->message;
10211021
}

0 commit comments

Comments
 (0)