mirror of
https://github.com/docusealco/docuseal.git
synced 2026-06-23 04:10:11 +00:00
adjust smtp from
This commit is contained in:
@@ -16,7 +16,11 @@ module ActionMailerConfigsInterceptor
|
||||
end
|
||||
|
||||
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
|
||||
message.from = ENV.fetch('SMTP_FROM')
|
||||
message.from = ENV.fetch('SMTP_FROM').to_s.split(',').sample
|
||||
|
||||
if message.from == 'DocuSeal <info@docuseal.com>'
|
||||
message.body.raw_source.gsub!('https://docuseal.co/', 'https://docuseal.com/')
|
||||
end
|
||||
|
||||
return message
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ module ActionMailerEventsObserver
|
||||
emailable_type:,
|
||||
event_type: :send,
|
||||
email:,
|
||||
data: { method: mail.delivery_method.class.name.underscore },
|
||||
data: { from: mail.from, method: mail.delivery_method.class.name.underscore },
|
||||
event_datetime: Time.current
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user