From a5de85bdb0b928f9bd275ddde6e40f16ff861018 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 21 Mar 2026 00:49:13 +0000 Subject: [PATCH] Send all attachments that are not voicemail --- app/email_queue/resources/jobs/email_send.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/email_queue/resources/jobs/email_send.php b/app/email_queue/resources/jobs/email_send.php index 91f29f5e18..c9c5fe3aa3 100755 --- a/app/email_queue/resources/jobs/email_send.php +++ b/app/email_queue/resources/jobs/email_send.php @@ -328,6 +328,11 @@ } } +//clear the array if this is a voicemail and file attachment is not enabled + if (!empty($email_uuid) && !empty($voicemail_file) && $voicemail_file !== 'attach') { + $email_attachments = ''; + } + //send the email $email = new email; $email->domain_uuid = $domain_uuid; @@ -338,7 +343,7 @@ $email->recipients = $email_to; $email->subject = $email_subject; $email->body = $email_body; - if ($voicemail_file == 'attach') { + if (!empty($email_attachments)) { $email->attachments = $email_attachments; } $email->debug_level = 3; @@ -433,7 +438,6 @@ } } - /* //build insert array $array['email_queue'][0]['email_queue_uuid'] = $email_queue_uuid;