Last active
December 18, 2015 11:09
-
-
Save noxqsgit/5773327 to your computer and use it in GitHub Desktop.
actionmailer + smtp + CFG
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
CFG = { | |
test: {}, | |
prod: {}, | |
dev: { | |
... | |
# smtp: { ... } | |
} | |
} |
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
CFG = { | |
test: {}, | |
dev: {}, | |
prod: { | |
# ... | |
smtp: { | |
address: 'smtp.gmail.com', | |
port: 587, | |
authentication: 'plain', | |
enable_starttls_auto: true, | |
user_name: '[email protected]', | |
password: '...', | |
}, | |
} | |
} |
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
# Action mailer settings | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = CFG[:prod][:smtp] | |
config.action_mailer.perform_deliveries = true | |
config.action_mailer.raise_delivery_errors = true | |
# ActionMailer::Base.default :from => '[email protected]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment