From 9bd77856b8e4f6ed78694a5f42026c8b7b49e62a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 23 Oct 2024 11:32:44 -0600 Subject: [PATCH] Fix the condition for smtp_from --- .../scripts/app/voicemail/resources/functions/send_email.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua b/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua index 1ebf327714..eaaa53dbb2 100644 --- a/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua +++ b/app/switch/resources/scripts/app/voicemail/resources/functions/send_email.lua @@ -314,10 +314,10 @@ --get the smtp from address and name smtp_from = settings:get('voicemail', 'smtp_from', 'text'); smtp_from_name = settings:get('voicemail', 'smtp_from_name', 'text'); - if (smtp_from and string.len(smtp_from) > 2) then + if (smtp_from == nil or smtp_from == '') then smtp_from = settings:get('email', 'smtp_from', 'text'); end - if (smtp_from_name and string.len(smtp_from_name) > 0) then + if (smtp_from_name == nil or smtp_from_name == '') then smtp_from_name = settings:get('email', 'smtp_from_name', 'text'); end if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then