In Rails 3 and ActionMailer, is it possible to send email using TLS over SSL (Not StartTLS)?

浪尽此生 提交于 2019-12-05 06:30:17
Matt Connolly

Yes, you can specify the :ssl option.

Set the following values in your config/environments/production.rb file:

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
    address: 'mail.example.com',
    port: 465,
    domain: 'example.com',
    user_name: 'no-reply@example.com',
    password: 'password',
    authentication: 'plain',
    ssl: true,
}

This works with my ISP (Bluehost) for sending mail.

The only solution I am aware of at this time is monkey patching the SMTP module

http://treadpath.typepad.com/thoughtintomotion/2011/06/actionmailer-woes-integrating-with-rackspaces-email-service.html

As of March 7th 2012...

Amazon SES now supports STARTTLS

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!