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.