Skip to content

Commit

Permalink
Configure mailer using Mandrill
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco de Juan committed Jun 6, 2013
1 parent d18f6b7 commit 70408b9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@

# Expands the lines which load the assets
config.assets.debug = true

config.action_mailer.default_url_options = { :host => 'padel.local:3000' }
end
3 changes: 3 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5

config.action_mailer.default_url_options = { :host => 'padel.heroku.com' }

end
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
config.mailer_sender = "Padel <padel@heroku.com>"

# Configure the class responsible to send e-mails.
# config.mailer = "Devise::Mailer"
Expand Down
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 = {
:port => '587',
:address => 'smtp.mandrillapp.com',
:user_name => ENV['MANDRILL_USERNAME'],
:password => ENV['MANDRILL_APIKEY'],
:domain => 'heroku.com',
:authentication => :plain
}
ActionMailer::Base.delivery_method = :smtp

0 comments on commit 70408b9

Please sign in to comment.