Created
December 21, 2012 19:07
-
-
Save anonymous/4355038 to your computer and use it in GitHub Desktop.
Issue getting sendgrid to work w/ my app..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/initializers/devise.rb | |
config.mailer_sender = "ENV['SENDGRID_USERNAME']" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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