From: Jules Maselbas Date: Sat, 14 Jul 2018 08:58:48 +0000 (+0200) Subject: send-email: fix tls AUTH when sending batch X-Git-Tag: v2.19.0-rc0~93^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/636f3d7ac51372276a8bfe940395661015ad1ef6?ds=inline;hp=-c 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 Signed-off-by: Junio C Hamano --- 636f3d7ac51372276a8bfe940395661015ad1ef6 diff --git a/git-send-email.perl b/git-send-email.perl index 8ec70e58ed..1f9a73f743 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1479,7 +1479,7 @@ sub send_message { SSL => 1); } } - else { + elsif (!$smtp) { $smtp_server_port ||= 25; $smtp ||= Net::SMTP->new($smtp_server, Hello => $smtp_domain, @@ -1501,7 +1501,6 @@ sub send_message { $smtp->starttls(ssl_verify_params()) or die sprintf(__("STARTTLS failed! %s"), IO::Socket::SSL::errstr()); } - $smtp_encryption = ''; # Send EHLO again to receive fresh # supported commands $smtp->hello($smtp_domain);