Open johanlunds opened 3 years ago
I think the code in the following block should be changed to:
smtp.enable_starttls_auto if settings[:enable_starttls_auto]
https://github.com/ianheggie/health_check/blob/6cd2f91b522b7d4af16386f5a2e8f76300a8d6a2/lib/health_check/utils.rb#L147-L153
Docs of Net::SMTP explains the difference:
https://www.rubydoc.info/stdlib/net/2.1.0/Net/SMTP
And you can also compare to how the mail gem used by ActionMailer/Rails does it:
mail
https://github.com/mikel/mail/blob/4f56234f04eb041810641ee0dfd717034a59b9dc/lib/mail/network/delivery_methods/smtp.rb#L112-L131
I think the code in the following block should be changed to:
https://github.com/ianheggie/health_check/blob/6cd2f91b522b7d4af16386f5a2e8f76300a8d6a2/lib/health_check/utils.rb#L147-L153
Docs of Net::SMTP explains the difference:
https://www.rubydoc.info/stdlib/net/2.1.0/Net/SMTP
And you can also compare to how the
mail
gem used by ActionMailer/Rails does it:https://github.com/mikel/mail/blob/4f56234f04eb041810641ee0dfd717034a59b9dc/lib/mail/network/delivery_methods/smtp.rb#L112-L131