From e22c972848de40462c946c193b1a29675ff02bef Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 29 Jan 2024 13:21:28 -0700 Subject: [PATCH] Fix issue where smtp from would send as <> --- .../app/voicemail/resources/functions/send_email.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 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 43da44c224..488cd5aca5 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 @@ -286,13 +286,13 @@ --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 == nil) then + if (smtp_from and string.len(smtp_from) > 2) then smtp_from = settings:get('email', 'smtp_from', 'text'); end - if (smtp_from_name == nil) then + if (smtp_from_name and string.len(smtp_from_name) > 0) then smtp_from_name = settings:get('email', 'smtp_from_name', 'text'); end - if (smtp_from_name ~= nil) then + if (smtp_from_name and string.len(smtp_from_name) > 0 and smtp_from and string.len(smtp_from) > 2) then smtp_from = smtp_from_name.."<"..smtp_from..">"; end