Skip to content

Instantly share code, notes, and snippets.

@roberttravispierce
Created June 14, 2017 05:41
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 roberttravispierce/aca9a2b2ebe6e4de5586241762d1bde2 to your computer and use it in GitHub Desktop.
Save roberttravispierce/aca9a2b2ebe6e4de5586241762d1bde2 to your computer and use it in GitHub Desktop.
...
# ActionMailer Config
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_caching = false
# MailCatcher gem settings
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
...
...
# ActionMailer Config
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587, # ports 587 and 2525 are also supported with STARTTLS
:enable_starttls_auto => true, # detects and uses STARTTLS
:user_name => ENV["SENDGRID_USERNAME"],
:password => ENV["SENDGRID_PASSWORD"], # SMTP password is any valid API key, when user_name is "apikey".
:authentication => 'login',
:domain => ENV['DOMAIN_NAME']
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment