adjust for multitenant

This commit is contained in:
Alex Turchyn
2023-06-30 20:31:17 +03:00
parent c904d51302
commit f5caed502f
24 changed files with 139 additions and 52 deletions
+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)