views:

140

answers:

3

How to send emails with "Rails 2.2.2 + Gmail"? I have tried several methods with smtp_tls, but not succeed. Who can give me an available tsl plugin download link and an actionmailer smtp_setting?

+2  A: 

Rails 2.2.1 ships with an option to enable it if you're running Ruby 1.8.7.

To set it all up, in config/initializers/smtp_gmail.rb, make sure to set :enable_starttls_auto to true.

ActionMailer::Base.smtp_settings = {
  :address => "smtp.gmail.com",
  :port => 587,
  :authentication => :plain,
  :enable_starttls_auto => true,
  :user_name => "noreply@gmail_or_your_google_domain.com",
  :password => "chucknorris"
}

Otherwise try ActionMailerTLS gem or plugin.

khelll
Worked like a charm man, thanks! I prefer using this to Heroku's instructions, since it keeps things portable.
Rob S.
A: 

here is a specific lib for this http://github.com/dcparker/ruby-gmail Its just ruby so integrating it into your rails scripts should be no problem

Peer Allan
A: 

You could try to use Pony with the gmail fix, if you only need something lightweight.

dvyjones