git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] send-email: Fix tls AUTH when sending batch

From
JMJules Maselbas <jules.maselbas@grenoble-inp.org>
Date
Jul 14, 2018, 08:58 UTC
Message-ID
<20180714085848.4031-1-jules.maselbas@grenoble-inp.org>
In-Reply-To
<20180714021440.22995-1-jules.maselbas@grenoble-inp.org>

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>
---
 git-send-email.perl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 8ec70e58e..1f9a73f74 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 again to receive fresh
 				# supported commands
 				$smtp->hello($smtp_domain);
-- 
2.18.0
Previous: Jules MaselbasNext: Junio C Hamano
Message 2 of 3 in “send-email: Fix tls AUTH when sending batch”
  1. send-email: Fix tls AUTH when sending batchJules Maselbas, Jul 14, 2018
  2. send-email: Fix tls AUTH when sending batchJules Maselbas, Jul 14, 2018
  3. Junio C HamanoJul 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.