Send base64 string to the send_mail function

This commit is contained in:
FusionPBX 2024-09-12 18:38:11 -06:00 committed by GitHub
parent 3429f12850
commit 2f4954fad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 13 deletions

View File

@ -1,3 +1,4 @@
--
-- Part of FusionPBX
-- Copyright (C) 2013 - 2024 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
@ -149,6 +150,9 @@
--save the recordings to the file system
if (string.len(row["message_base64"]) > 32) then
--save the value to a variable
voicemail_base64 = row["message_base64"];
--include the file io
local file = require "resources.functions.file"
@ -322,20 +326,20 @@
--send the email with, or without, including the intro
if (file_exists(combined)) then
send_mail(headers,
smtp_from,
voicemail_mail_to,
{subject, body},
(voicemail_file == "attach") and combined
);
voicemail_path = combined
else
voicemail_path = file
end
--send the email
send_mail(headers,
smtp_from,
voicemail_mail_to,
{subject, body},
(voicemail_file == "attach") and file
(voicemail_file == "attach") and voicemail_path,
voicemail_base64
);
end
end
--whether to keep the voicemail message and details local after email