From ff881fcad9675f65b4b798635f13fddf33052837 Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Fri, 25 Mar 2022 16:13:45 +0530 Subject: [PATCH] chore: Support Email should give priority to environment variable (#4270) Account.support_email should give priority to environment variables over installation config Fixes: #3304 --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index be081767c..c9b9befdb 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -111,7 +111,7 @@ class Account < ApplicationRecord end def support_email - super || GlobalConfig.get('MAILER_SUPPORT_EMAIL')['MAILER_SUPPORT_EMAIL'] || ENV.fetch('MAILER_SENDER_EMAIL', 'Chatwoot ') + super || ENV['MAILER_SENDER_EMAIL'] || GlobalConfig.get('MAILER_SUPPORT_EMAIL')['MAILER_SUPPORT_EMAIL'] end def usage_limits