Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running into an issue while sending an SMTP mail with v2.7.1 on Ruby 3.0.0 on container #1583

Open
vinutha-g opened this issue Jul 10, 2023 · 0 comments

Comments

@vinutha-g
Copy link

vinutha-g commented Jul 10, 2023

/usr/local/lib/ruby/3.0.0/net/protocol.rb:46:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError)
	from /usr/local/lib/ruby/3.0.0/net/protocol.rb:46:in `ssl_socket_connect'
	from /usr/local/lib/ruby/3.0.0/net/smtp.rb:624:in `tlsconnect'
	from /usr/local/lib/ruby/3.0.0/net/smtp.rb:600:in `do_start'
	from /usr/local/lib/ruby/3.0.0/net/smtp.rb:557:in `start'
	from /usr/local/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
	from /usr/local/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
	from /usr/local/bundle/gems/mail-2.7.1/lib/mail/message.rb:276:in `deliver!'
	from /usr/local/bundle/gems/pony-1.13.1/lib/pony.rb:177:in `deliver'
	from /usr/local/bundle/gems/pony-1.13.1/lib/pony.rb:166:in `mail'

Please find the config below:

def self.send_using_options(options, environment)
        options[:from] = 'no_reply@company.com'
        options[:via] = :smtp
        options[:via_options] = {
          address: smtp_server_address(environment),
          port: '25',
          domain: 'company.com',
          enable_starttls: false
        }
        Pony.mail(options)
      end

We had run into a similar issue on Ruby 2.6.4 with mail v2.8.x, downgrading mail to v.2.7.1 resolved the issue.
With ruby uplift to 3.0.0 the issue has resurfaced even on mail v2.7.1

@vinutha-g vinutha-g changed the title Running into an issue while sending an SMTP mail with v2.7.1 on Ruby 3.0.0 Running into an issue while sending an SMTP mail with v2.7.1 on Ruby 3.0.0 on container Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant