Skip to content

Instantly share code, notes, and snippets.

@gerep
Created February 10, 2017 12:25
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 gerep/00a8e524dc52ea77dd104cbb0f657e8b to your computer and use it in GitHub Desktop.
Save gerep/00a8e524dc52ea77dd104cbb0f657e8b to your computer and use it in GitHub Desktop.
config.action_mailer.default_url_options = { host: 'domain.com.br' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default charse: 'utf-8'
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587, # ports 587 and 2525 are also supported with STARTTLS
:enable_starttls_auto => false, # detects and uses STARTTLS
:user_name => "apikey",
:password => ENV["SENDGRID_API_KEY"], # SMTP password is any valid API key, when user_name is "apikey".
:authentication => 'plain',
:domain => 'domain.com.br', # your domain to identify your server when connecting
}
Completed 500 Internal Server Error in 487ms
ArgumentError (SMTP-AUTH requested but missing secret phrase):
app/controllers/contacts_controller.rb:9:in `create'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment