Skip to content

Commit

Permalink
add mailer configuration for production
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolgual committed Mar 24, 2012
1 parent b7c2fe0 commit 93a61e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,13 @@

# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify

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']
}
end
9 changes: 9 additions & 0 deletions config/initializers/mail.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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

0 comments on commit 93a61e3

Please sign in to comment.