Fix issue where smtp from would send as <>

This commit is contained in:
FusionPBX
2024-01-29 13:20:17 -07:00
committed by GitHub
parent 0316248bef
commit 3e62819779

View File

@@ -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