Tatva-Artha

meaning of "it"

ActionMailer, GMail and TLS

with one comment

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!

http://www.tatvartha.com/wp-content/plugins/sociofluid/images/digg_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/reddit_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/stumbleupon_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/delicious_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/google_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/twitter_16.png

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Written by admin

May 4th, 2009 at 9:23 pm

Posted in All,Technology

Tagged with ,

One Response to 'ActionMailer, GMail and TLS'

Subscribe to comments with RSS or TrackBack to 'ActionMailer, GMail and TLS'.

  1. 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

Leave a Reply