I recently learned how to setup mailers for the current app I am working on. It turns out that it is fairly easy. The hard part is setting the proper configurations. Lets start with our development environment.
environments/development.rb
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'localhost:3000'}
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gamil.com',
port: '587',
domain: 'gmail.com',
authentication: 'plain',
enable_starttls_auto: true,
user_name: ENV['GMAIL_USER_NAME'],
password: ENV['GMAIL_PASSWORD']
}
Next the production settings