Last active
December 28, 2015 10:08
-
-
Save ushu/7483744 to your computer and use it in GitHub Desktop.
Rails: SendGrid settings
This file contains 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/sendgrid.rb | |
ActionMailer::Base.smtp_settings = { | |
:user_name => ENV['SENDGRID_USER'], | |
:password => ENV['SENDGRID_PASSWORD'], | |
:domain => 'herokuapp.com', | |
:address => 'smtp.sendgrid.net', | |
:port => 587, | |
:authentication => :plain, | |
:enable_starttls_auto => true | |
} | |
# for use with Devise | |
ActionMailer::Base.default_url_options[:host] = "localhost:3000" unless Rails.env.production? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment