Skip to content
Snippets Groups Projects
Unverified Commit 56edc655 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Add `SMTP_RETURN_PATH` environment variable to set bounce domain (#17886)

parent 2c45859c
No related branches found
No related tags found
No related merge requests found
......@@ -91,11 +91,13 @@ Rails.application.configure do
# E-mails
outgoing_email_address = ENV.fetch('SMTP_FROM_ADDRESS', 'notifications@localhost')
outgoing_mail_domain = Mail::Address.new(outgoing_email_address).domain
outgoing_email_domain = Mail::Address.new(outgoing_email_address).domain
config.action_mailer.default_options = {
from: outgoing_email_address,
reply_to: ENV['SMTP_REPLY_TO'],
'Message-ID': -> { "<#{Mail.random_tag}@#{outgoing_mail_domain}>" },
return_path: ENV['SMTP_RETURN_PATH'],
message_id: -> { "<#{Mail.random_tag}@#{outgoing_email_domain}>" },
}
config.action_mailer.smtp_settings = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment