Skip to content

Instantly share code, notes, and snippets.

@ushu
Last active December 28, 2015 10:08
Show Gist options
  • Save ushu/7483744 to your computer and use it in GitHub Desktop.
Save ushu/7483744 to your computer and use it in GitHub Desktop.
Rails: SendGrid settings
# 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