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 <jules.maselbas@grenoble-inp.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jules Maselbas committed
Jul 14, 2018 at 10:58 UTC
636f3d7ac51372276a8bfe940395661015ad1ef6
1 file changed
+1
-2
git-send-email.perl
+1
-2
@@ -1479,7 +1479,7 @@ EOF
1479
SSL => 1);
1480
}
1481
}
1482
- else {
1482
+ elsif (!$smtp) {
1483
$smtp_server_port ||= 25;
1484
$smtp ||= Net::SMTP->new($smtp_server,
1485
Hello => $smtp_domain,
@@ -1501,7 +1501,6 @@ EOF
1501
$smtp->starttls(ssl_verify_params())
1502
or die sprintf(__("STARTTLS failed! %s"), IO::Socket::SSL::errstr());
1503
}
1504
- $smtp_encryption = '';
1504
# Send EHLO again to receive fresh
1505
# supported commands
1506
$smtp->hello($smtp_domain);