adjust from email
This commit is contained in:
@@ -18,7 +18,11 @@ module ActionMailerConfigsInterceptor
|
||||
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
|
||||
from = ENV.fetch('SMTP_FROM').to_s.split(',').sample
|
||||
|
||||
message.from = from
|
||||
if from.match?(User::FULL_EMAIL_REGEXP)
|
||||
message[:from] = message[:from].to_s.sub(User::EMAIL_REGEXP, from)
|
||||
else
|
||||
message.from = from
|
||||
end
|
||||
|
||||
if from == 'DocuSeal <info@docuseal.com>'
|
||||
message.body.instance_variable_set(
|
||||
|
||||
Reference in New Issue
Block a user