ActionMailer, GMail and TLS
Prior to rails 2.3.2, if you needed to use GMail as your SMTP carrier (sending out emails from your app), you had to use one of the following plugins to modify the ActionMailer::Base class to support TLS for ActiveRecord.
- tlsmail
- ambethia-smtp-tls
- openrain-action_mailer_tls
- simplificator-tls-support
In rails 2.3.2, this is supported natively, provided you had proper configuration specified:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'localhost.localdomain',
:authentication => :plain,
:user_name => "username",
:password => "password"
}
This should work without any plugins/gems in rails 2.3.2. The only caveat is that ruby version has to be >= 1.8.7. It won’t work with ruby 1.8.6 or older, as documented here.
Enjoy!
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.






found another plugin smtp_tls (http://dev.nuclearrooster.com/2007/12/12/creating-a-ruby-gem-for-smtp_tls/) for this.
However, this issue may not be relevant anymore with newer versions of ruby/rails.
Sharad
13 Nov 09 at 5:50 pm