Skip to content

Commit

Permalink
Add SMTP reply_to option (#11718)
Browse files Browse the repository at this point in the history
* Add SMTP_REPLY_TO in .env.production.sample

* Set reply_to in SMTP options
  • Loading branch information
Hugo Gameiro authored and Gargron committed Sep 2, 2019
1 parent 1f22b81 commit 5466b39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.production.sample
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@example.com
#SMTP_REPLY_TO=
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
#SMTP_AUTH_METHOD=plain
Expand Down
5 changes: 4 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@
config.action_mailer.perform_caching = false

# E-mails
config.action_mailer.default_options = { from: ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost') }
config.action_mailer.default_options = {
from: ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost'),
reply_to: ENV['SMTP_REPLY_TO']
}

config.action_mailer.smtp_settings = {
:port => ENV['SMTP_PORT'],
Expand Down

0 comments on commit 5466b39

Please sign in to comment.