From e524f1ce7ce63c419041e24f80387088cb69dea4 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 30 Jan 2024 16:40:19 -0500 Subject: [PATCH] Fix issue with adding slashes to close email config_from_name vars --- post/ticket.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/post/ticket.php b/post/ticket.php index f4cbc635..b7ec8c75 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -661,9 +661,9 @@ if (isset($_POST['bulk_close_tickets'])) { $contact_email = sanitizeInput($row['contact_email']); // Sanitize Config vars from get_settings.php - $config_ticket_from_name = sanitizeInput($config_ticket_from_name); - $config_ticket_from_email = sanitizeInput($config_ticket_from_email); - $config_base_url = sanitizeInput($config_base_url); + $from_name = sanitizeInput($config_ticket_from_name); + $from_email = sanitizeInput($config_ticket_from_email); + $base_url = sanitizeInput($config_base_url); // Get Company Info $sql = mysqli_query($mysqli,"SELECT company_name, company_phone FROM companies WHERE company_id = 1"); @@ -677,14 +677,14 @@ if (isset($_POST['bulk_close_tickets'])) { $data = []; $subject = "Ticket closed - [$ticket_prefix$ticket_number] - $ticket_subject | (do not reply)"; - $body = "Hello $contact_name,

Your ticket regarding \"$ticket_subject\" has been closed.

$details

We hope the issue was resolved to your satisfaction. If you need further assistance, please raise a new ticket using the below details. Please do not reply to this email.

Ticket: $ticket_prefix$ticket_number
Subject: $ticket_subject
Portal: https://$config_base_url/portal/ticket.php?id=$ticket_id

--
$company_name - Support
$config_ticket_from_email
$company_phone"; + $body = "Hello $contact_name,

Your ticket regarding \"$ticket_subject\" has been closed.

$details

We hope the issue was resolved to your satisfaction. If you need further assistance, please raise a new ticket using the below details. Please do not reply to this email.

Ticket: $ticket_prefix$ticket_number
Subject: $ticket_subject
Portal: https://$base_url/portal/ticket.php?id=$ticket_id

--
$company_name - Support
$config_ticket_from_email
$company_phone"; // Email Ticket Contact // Queue Mail $data[] = [ - 'from' => $config_ticket_from_email, - 'from_name' => $config_ticket_from_name, + 'from' => $from_email, + 'from_name' => $from_name, 'recipient' => $contact_email, 'recipient_name' => $contact_name, 'subject' => $subject, @@ -699,8 +699,8 @@ if (isset($_POST['bulk_close_tickets'])) { // Queue Mail $data[] = [ - 'from' => $config_ticket_from_email, - 'from_name' => $config_ticket_from_name, + 'from' => $from_email, + 'from_name' => $from_name, 'recipient' => $watcher_email, 'recipient_name' => $watcher_email, 'subject' => $subject, @@ -710,8 +710,7 @@ if (isset($_POST['bulk_close_tickets'])) { addToMailQueue($mysqli, $data); } - } - // End Mail IF + } // End Mail IF } // End Loop } // End Array Empty Check