Skip to content

Instantly share code, notes, and snippets.

@patrickcurl
Forked from anonymous/development
Last active December 10, 2015 00:59
Show Gist options
  • Save patrickcurl/4355039 to your computer and use it in GitHub Desktop.
Save patrickcurl/4355039 to your computer and use it in GitHub Desktop.
# config/environments/development
# ActionMailer Config
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
# change to true to allow email to be sent during development
config.action_mailer.perform_deliveries = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"
#config.action_mailer.default_url_options = { :host => 'your.websitedomain.com' }
config.action_mailer.smtp_settings = {
address: "smtp.sendgrid.net",
port: 25,
domain: "heroku",
authentication: "plain",
user_name: ENV["SENDGRID_USERNAME"],
password: ENV["SENDGRID_PASSWORD"]
}
#config/initializers/devise.rb
config.mailer_sender = "ENV['SENDGRID_USERNAME']"
#config/initializers/mail.rb
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}
ActionMailer::Base.delivery_method = :smtp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment