Skip to content

Instantly share code, notes, and snippets.

@noxqsgit
Last active December 18, 2015 11:09
Show Gist options
  • Save noxqsgit/5773327 to your computer and use it in GitHub Desktop.
Save noxqsgit/5773327 to your computer and use it in GitHub Desktop.
actionmailer + smtp + CFG
CFG = {
test: {},
prod: {},
dev: {
...
# smtp: { ... }
}
}
CFG = {
test: {},
dev: {},
prod: {
# ...
smtp: {
address: 'smtp.gmail.com',
port: 587,
authentication: 'plain',
enable_starttls_auto: true,
user_name: '[email protected]',
password: '...',
},
}
}
# 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