ActionMailer

Sending email over TLS in Ruby

This hack should go away in Ruby 1.9

1. install the tlsmail gem:

sudo gem install tlsmail

2. then in your config/environment.rb file add this:

require 'tlsmail'
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)

ActionMailer::Base.server_settings = {
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'yourdomain.com',
:authentication => :plain,
:user_name => 'username',
:password => 'password'
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License