mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
adjust smtp from
This commit is contained in:
1 parent
1fc1e9af16
commit
48f3b13f3e
2 files changed
+6
-2
No files matched your search
@@ -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