mikel / mail

A Really Ruby Mail Library
MIT License
3.6k stars 931 forks source link

Mail calls non-existent Net::SMTP disable_starttls_auto #1571

Closed vladimir-mencl-eresearch closed 1 year ago

vladimir-mencl-eresearch commented 1 year ago

Hi,

After updating to mail 2.8.0, mail delivery from my app stopped working for me.

I have enable_starttls_auto: false in my Mail delivery_method defaults.

The recent changes to lib/mail/network/delivery_methods/smtp.rb (d91f335) call disable_starttls_auto method that does not exist in net/smtp.rb, resulting into:

2023-03-20 10:43:04 - NoMethodError - undefined method `disable_starttls_auto' for #<Net::SMTP localhost:25 started=false>

I believe this could be easily fixed by replacing the disable_starttls_auto call with disable_starttls - looking at https://github.com/ruby/net-smtp/blob/master/lib/net/smtp.rb, the "auto" behaviour is just tracked by setting @starttls to :auto, and setting it to false would do the right thing.

Cheers, Vlad

vladimir-mencl-eresearch commented 1 year ago

FYI @jeremy @eval

eval commented 1 year ago

@vladimir-mencl-eresearch this was fixed in v2.8.1.

vladimir-mencl-eresearch commented 1 year ago

Ah, I now see it was - should, should have checked before reporting.