Skip to content

Instantly share code, notes, and snippets.

@rwdaigle
Created January 27, 2012 20:05
Show Gist options
  • Save rwdaigle/1690653 to your computer and use it in GitHub Desktop.
Save rwdaigle/1690653 to your computer and use it in GitHub Desktop.
Sendgrid Rails initializer template
if(Rails.env.production?)
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
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment