25th
Jun
2009
Rails 2.3.3 + Ruby 1.8.7 + Gmail SMTP settings
It’s not rocket science, but since I took a while to figure this out I thought I’d share:
ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => 587, :domain => "your-google-apps-domain", :authentication => :plain, :user_name => "username", :password => "password" }
The most important line is enable_starttls_auto => true.
Unlike pre 2.2 Rails, no plugin is required. Not sure this setup works with Rails 2.2 though, never tried it.







November 15th, 2009 at 8:39 pm
[...] 7:38 pm on November 15, 2009 Reply Tags: email (2), howtos, rails (85) http://davidebenini.it/2009/06/25/rails-233-ruby-187-gmail-smtp-settings/ – Rails 2.3.3 + Ruby 1.8.7 + Gmail SMTP settings [...]
November 24th, 2009 at 9:35 pm
where did you put that code?
December 27th, 2009 at 7:35 am
Yep, definitely useful.
February 5th, 2010 at 9:53 pm
conspirisi: you put it in an initializer, like config/initializers/application.rb
April 12th, 2010 at 8:48 pm
Many thanks ! I needed that :enablestarttlsauto wisdom
May 17th, 2010 at 8:21 am
I am really thankful to the author of this post for making this lovely and informative article live here for us. We really appreciate ur effort. Keep up the good work. . . .
June 10th, 2010 at 10:33 am
I would have to agree with 99% of this.