From ac96fa389eaf204ed096abfe90f8f0e6e2ad0e4f Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:56:19 +0700 Subject: [PATCH] Reset SMTP capabilities around connection attempts --- lib/net/smtp.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index cca06e6..ff2019c 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -668,6 +668,7 @@ def do_start(helo_domain, user, secret, authtype) if user || secret || authtype check_auth_args authtype, user, secret end + @capabilities = nil s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do tcp_socket(@address, @port) end @@ -691,6 +692,7 @@ def do_start(helo_domain, user, secret, authtype) # authentication failed, cancel connection. s.close if s @socket = nil + @capabilities = nil end end