/SMTP-TLS

Ruby on Rails sending email using Google Apps

Primary LanguageRuby

Sending email using Google Apps

Set the config/environment.rb


...
require 'smtp_tls'

Rails::Initializer.run do |config|
...
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :address => "smtp.gmail.com",
    :port => 587,
    :authentication => :plain,
    :user_name => "your-name@yourdomain.com",
    :password => "your password"
  }
end

SMTP TLS

Copy the file smtp_tls.rb to lib directory of your Ruby on Rails project.