[Rails] Using ssl/tls with ActionMailer (gmail)

drawohara:

Using ActionMailer with tsl/ssl (for example with gmail) can be this easy

# # step 1 - grab this tls patch for ruby’s net/smtp.rb lib #

curl -s http://s3.amazonaws.com/drawohara.com.ruby/tls_smtp.rb >

./lib/tls_smtp.rb

# # step 2 - put something like this into ./config/initializers/email.rb #

require ‘tls_smtp’

ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address => ‘smtp.gmail.com’, :port => 25, :domain => ‘yourdomain.com’, :user_name => ‘zaphod@yourdomain.com’, :password => ‘beeblebrox’, :authentication => :plain,

}

Awesome - just what i needed!