Fix email transcribe when sending an email download or listen link

This commit is contained in:
FusionPBX
2026-03-20 16:59:48 +00:00
committed by GitHub
parent 617e883b19
commit 3937f9c250
2 changed files with 6 additions and 3 deletions

View File

@@ -171,7 +171,7 @@
//$voicemail_sms_to = $row["voicemail_sms_to "];
$voicemail_transcription_enabled = $row["voicemail_transcription_enabled"];
//$voicemail_attach_file = $row["voicemail_attach_file"];
//$voicemail_file = $row["voicemail_file"];
$voicemail_file = $row["voicemail_file"];
//$voicemail_local_after_email = $row["voicemail_local_after_email"];
//$voicemail_enabled = $row["voicemail_enabled"];
//$voicemail_description = $row["voicemail_description"];
@@ -338,7 +338,9 @@
$email->recipients = $email_to;
$email->subject = $email_subject;
$email->body = $email_body;
$email->attachments = $email_attachments;
if ($voicemail_file == 'attach') {
$email->attachments = $email_attachments;
}
$email->debug_level = 3;
$email->method = 'direct';
$email_status = $email->send();

View File

@@ -194,6 +194,7 @@ function send_email(id, uuid)
else
sql = sql .. "AND template_subcategory = 'default' "
end
sql = sql .. "AND template_type = 'html' "
sql = sql .. "AND template_enabled = true "
sql = sql .. "ORDER BY domain_uuid DESC "
local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
@@ -337,7 +338,7 @@ function send_email(id, uuid)
smtp_from,
voicemail_mail_to,
{subject, body},
(voicemail_file == "attach") and voicemail_path,
voicemail_path,
voicemail_base64
);