Skip to content

Instantly share code, notes, and snippets.

@eltercero
Created August 6, 2015 10:42
Show Gist options
  • Save eltercero/b3fb67b315e04d3cb257 to your computer and use it in GitHub Desktop.
Save eltercero/b3fb67b315e04d3cb257 to your computer and use it in GitHub Desktop.
ActionMailer with Gmail
development:
:address: smtp.gmail.com
:port: 587
:authentication: plain
:user_name: "" #user@gmail.com
:password: "" #password
:enable_starttls_auto: true
# add in config/initializers
if Rails.env != 'test'
email_settings = YAML::load(File.open("#{Rails.root.to_s}/config/email.yml"))
ActionMailer::Base.smtp_settings = email_settings[Rails.env] unless email_settings[Rails.env].nil?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment