From 88a29b75998c26aed27989666386eb28798a8b72 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Fri, 9 Jan 2026 16:56:11 +0000 Subject: [PATCH] Bugfix: Mail queue loop not sending invoices to all billing contacts --- agent/post/invoice.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/agent/post/invoice.php b/agent/post/invoice.php index 824da9c1..b0283e32 100644 --- a/agent/post/invoice.php +++ b/agent/post/invoice.php @@ -570,15 +570,13 @@ if (isset($_GET['email_invoice'])) { } // Queue Mail - $data = [ - [ + $data[] = [ 'from' => $config_invoice_from_email, 'from_name' => $config_invoice_from_name, 'recipient' => $contact_email, 'recipient_name' => $contact_name, 'subject' => $subject, 'body' => $body - ] ]; addToMailQueue($data); @@ -613,15 +611,13 @@ if (isset($_GET['email_invoice'])) { $billing_contact_name = sanitizeInput($billing_contact['contact_name']); $billing_contact_email = sanitizeInput($billing_contact['contact_email']); - $data = [ - [ + $data[] = [ 'from' => $config_invoice_from_email, 'from_name' => $config_invoice_from_name, 'recipient' => $billing_contact_email, 'recipient_name' => $billing_contact_name, 'subject' => $subject, 'body' => $body - ] ]; logAction("Invoice", "Email", "$session_name Emailed $billing_contact_email Invoice $invoice_prefix$invoice_number Email queued Email ID: $email_id", $client_id, $invoice_id);