adjust for multitenant

This commit is contained in:
Alex Turchyn committed 2023-06-30 22:41:53 +03:00
1 parent c904d51302
commit f5caed502f
24 files changed
+139 -52

No files matched your search

+5 -1
View File
@@ -4,7 +4,11 @@ module ActionMailerConfigsInterceptor
module_function
def delivering_email(message)
return message unless Rails.env.production?
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
message.from = ENV.fetch('SMTP_FROM')
return message
end
email_configs = EncryptedConfig.find_by(key: EncryptedConfig::EMAIL_SMTP_KEY)