You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Truemail
module Validate
class Smtp
class Request
def start_session_wrapper(&block)
ruby3 = ::RUBY_VERSION[/\A3\..+\z/]
if ruby3
session.start(configuration.verifier_domain, tls_verify: false, &block)
else
session.start(configuration.verifier_domain, &block)
end
end
def run
start_session_wrapper do |smtp_request|
response.connection = response.helo = true
smtp_handshakes(smtp_request, response)
end
rescue => error
retry if attempts_exist?
assign_error(attribute: :connection, message: compose_from(error))
end
end
end
end
end
So if I don't miss anything I could create a PR using this patch 🤷♂️
The text was updated successfully, but these errors were encountered:
Hi, @evserykh! What your truemail version, show your Truemail::VERSION output please. Which version are you using? As far as I remember this issue has been fixed in latest release: #186. Current master:
Oh, my fault. Latest updates have broke Net::SMTP#start Ruby 2.x compatibility. Looks like that I should as soon as possible write truemail integration tests using smtpmock under the hood to get rid bugs like this one in the future 👯♀️
New bug checklist
truemail
to the latest versionBug description
I'm using the following Ruby version
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
Here is the code I use:
and here is the output:
After some research I figured out before Ruby 3 the
Net::SMTP#start
method's definition looks like this:and starting from Ruby 3 the method's definition has been changed to this:
This monkey patch allows to fix my case:
So if I don't miss anything I could create a PR using this patch 🤷♂️
The text was updated successfully, but these errors were encountered: