This gem makes it trivial to send email through a Gmail account or a Google Apps for business email account.
This gem will only work on Ruby 1.8.6. If you're on Ruby 1.8.7 and Rails >= 2.2.1, you don't need this gem. See Notes below.
To install the gem (the preferred way):
sudo gem install openrain-action_mailer_tls -s http://gems.github.com
./script/generate action_mailer_tls
To (optionally) vendor this gem:
To install the plugin (the old way):
./script/plugin install git://github.com/openrain/action_mailer_tls.git -r 'tag v1.0.0'
./script/generate mailer Notifier hello_world
./script/console
Notifier.deliver_hello_world!
Blog posts
Books
If you're running Rails >= 2.2.1 [RC2] and Ruby 1.8.7, you don't need this gem. Ruby 1.8.7 supports SMTP TLS and 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"
}
For more information on this feature, check out the commit log