mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
adjust from email
This commit is contained in:
1 parent
e398327fb7
commit
3975a03cb4
3 files changed
+9
-2
No files matched your search
@@ -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