Setup SendGrid for outgoing email

This commit is contained in:
Erik Michaels-Ober 2011-05-15 17:28:15 -07:00
parent 1cfaea1eb3
commit a8cd7c725c
2 changed files with 10 additions and 3 deletions

View File

@ -37,8 +37,8 @@ AdoptAHydrant::Application.configure do
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = {:host => 'adoptahydrant.org'}
# Enable threaded mode
@ -51,4 +51,3 @@ AdoptAHydrant::Application.configure do
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end

View File

@ -0,0 +1,8 @@
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => "25",
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => ENV['SENDGRID_DOMAIN']
}