Created
August 6, 2015 10:42
-
-
Save eltercero/b3fb67b315e04d3cb257 to your computer and use it in GitHub Desktop.
ActionMailer with Gmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
:address: smtp.gmail.com | |
:port: 587 | |
:authentication: plain | |
:user_name: "" #user@gmail.com | |
:password: "" #password | |
:enable_starttls_auto: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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