fix demo mode

This commit is contained in:
Alex Turchyn committed 2023-07-13 00:34:29 +03:00
1 parent 4ffd198505
commit 03ad848d45
5 files changed
+12 -4

No files matched your search

+6
View File
@@ -4,6 +4,12 @@ module ActionMailerConfigsInterceptor
module_function
def delivering_email(message)
if Docuseal.demo?
message.delivery_method(:test)
return message
end
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
message.from = ENV.fetch('SMTP_FROM')