Skip to content

Instantly share code, notes, and snippets.

@parkr
Last active December 28, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parkr/7519975 to your computer and use it in GitHub Desktop.
Save parkr/7519975 to your computer and use it in GitHub Desktop.
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:user_name => ENV["SMTP_USERNAME"], # <-- this line
:password => ENV["SMTP_PASSWORD"], # <-- this line
:authentication => "plain",
:enable_starttls_auto => true
}
# then run:
# heroku config:set SMTP_USERNAME=myusername
# heroku config:set SMTP_PASSWORD=mypassword
#! /bin/bash
export SMTP_USERNAME="aenoae"
export SMTP_PASSWORD="oiafeinoaef"
./bin/rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment