diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 4c03101..673b787 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: ENV["MAILER_USERNAME"] + default from: ENV["MAILER_FROM"] layout 'mailer' end diff --git a/config/environments/production.rb b/config/environments/production.rb index 013a963..38b3f39 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -73,6 +73,11 @@ password: ENV["MAILER_PASSWORD"] } + config.action_mailer.default_options = { + from: mailer_credentials[:from], + reply_to: mailer_credentials[:from] + } + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 013a963..38b3f39 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -73,6 +73,11 @@ password: ENV["MAILER_PASSWORD"] } + config.action_mailer.default_options = { + from: mailer_credentials[:from], + reply_to: mailer_credentials[:from] + } + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false