From 05cae1be62f0378683b824d3daa608d4f57e5f7e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 29 Dec 2021 15:30:15 -0700 Subject: [PATCH] Remove local so the email_from has a value outside the if statement. --- .../resources/scripts/resources/functions/send_mail.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/resources/scripts/resources/functions/send_mail.lua b/app/scripts/resources/scripts/resources/functions/send_mail.lua index 649f3c5efb..703ddd1cd4 100644 --- a/app/scripts/resources/scripts/resources/functions/send_mail.lua +++ b/app/scripts/resources/scripts/resources/functions/send_mail.lua @@ -32,8 +32,8 @@ if (email_queue_enabled == 'true') then local settings = Settings.new(db, domain_name, domain_uuid); if (email_from == nil or email_from == "") then - local email_from = settings:get('email', 'smtp_from', 'text'); - local from_name = settings:get('email', 'smtp_from_name', 'text'); + email_from = settings:get('email', 'smtp_from', 'text'); + from_name = settings:get('email', 'smtp_from_name', 'text'); end if (email_from == nil or email_from == "") then