Skip to content

Commit 636f3d7

Browse files
Jules Maselbasgitster
Jules Maselbas
authored andcommitted
send-email: fix tls AUTH when sending batch
The variable smtp_encryption must keep it's value between two batches. Otherwise the authentication is skipped after the first batch. Signed-off-by: Jules Maselbas <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 53f9a3e commit 636f3d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

git-send-email.perl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ sub send_message {
14791479
SSL => 1);
14801480
}
14811481
}
1482-
else {
1482+
elsif (!$smtp) {
14831483
$smtp_server_port ||= 25;
14841484
$smtp ||= Net::SMTP->new($smtp_server,
14851485
Hello => $smtp_domain,
@@ -1501,7 +1501,6 @@ sub send_message {
15011501
$smtp->starttls(ssl_verify_params())
15021502
or die sprintf(__("STARTTLS failed! %s"), IO::Socket::SSL::errstr());
15031503
}
1504-
$smtp_encryption = '';
15051504
# Send EHLO again to receive fresh
15061505
# supported commands
15071506
$smtp->hello($smtp_domain);

0 commit comments

Comments
 (0)