Skip to content

Commit 5466b39

Browse files
Hugo GameiroGargron
authored andcommitted
Add SMTP reply_to option (#11718)
* Add SMTP_REPLY_TO in .env.production.sample * Set reply_to in SMTP options
1 parent 1f22b81 commit 5466b39

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.env.production.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ SMTP_PORT=587
6969
SMTP_LOGIN=
7070
SMTP_PASSWORD=
7171
SMTP_FROM_ADDRESS=notifications@example.com
72+
#SMTP_REPLY_TO=
7273
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
7374
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
7475
#SMTP_AUTH_METHOD=plain

config/environments/production.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@
8383
config.action_mailer.perform_caching = false
8484

8585
# E-mails
86-
config.action_mailer.default_options = { from: ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost') }
86+
config.action_mailer.default_options = {
87+
from: ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost'),
88+
reply_to: ENV['SMTP_REPLY_TO']
89+
}
8790

8891
config.action_mailer.smtp_settings = {
8992
:port => ENV['SMTP_PORT'],

0 commit comments

Comments
 (0)