Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #34 from jgunnink/setup_sendgrid
Browse files Browse the repository at this point in the history
Setup sendgrid
  • Loading branch information
jgunnink committed Oct 17, 2016
2 parents db3f3c5 + 90dc2a2 commit 5dd77e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set defaults for outgoing mail.
class ApplicationMailer < ActionMailer::Base
default from: 'Captain Santa <santa@secretsanta.com>'
default from: 'Captain Santa <captain-santa@secretsanta.website>'
layout 'mailer'
end
10 changes: 9 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@
config.i18n.fallbacks = true

# ActionMailer settings
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:user_name => ENV["sendgrid_username"],
:password => ENV["sendgrid_password"],
:domain => 'secretsanta.website',
:address => 'smtp.sendgrid.net',
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true
}

# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
Expand Down
2 changes: 1 addition & 1 deletion spec/mailers/assignment_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end
let!(:list) { santa.list }

it { should deliver_from('Captain Santa <santa@secretsanta.com>') }
it { should deliver_from('Captain Santa <captain-santa@secretsanta.website>') }
it { should have_subject "Your Secret Santa for #{list.name}" }
it { should have_content "Dear #{santa.name}" }
it { should have_content "You're on the list for #{list.name}" }
Expand Down

0 comments on commit 5dd77e9

Please sign in to comment.