From 2149a33bd56f3d46638b37c2045cecd863713d90 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 30 May 2024 16:36:38 -0400 Subject: [PATCH] Added Email Client to ticket details, Public Comment does not email the client or watchers anything, but can view it in the ticker portal --- post/ticket.php | 9 +++++++-- ticket.php | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/post/ticket.php b/post/ticket.php index 1228b23e..7e076210 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -1105,9 +1105,14 @@ if (isset($_POST['add_ticket_reply'])) { $client_id = intval($_POST['client_id']); + $send_email = 0; + if ($_POST['public_reply_type'] == 1 ){ $ticket_reply_type = 'Public'; - } else { + } elseif ($_POST['public_reply_type'] == 2 ) { + $ticket_reply_type = 'Public'; + $send_email = 1; + } else { $ticket_reply_type = 'Internal'; } @@ -1157,7 +1162,7 @@ if (isset($_POST['add_ticket_reply'])) { $company_phone = sanitizeInput(formatPhoneNumber($row['company_phone'])); // Send e-mail to client if public update & email is set up - if ($ticket_reply_type == 'Public' && !empty($config_smtp_host)) { + if ($ticket_reply_type == 'Public' && $send_email == 1 && !empty($config_smtp_host)) { if (filter_var($contact_email, FILTER_VALIDATE_EMAIL)) { diff --git a/ticket.php b/ticket.php index bd89a7d0..2e88cb37 100644 --- a/ticket.php +++ b/ticket.php @@ -544,6 +544,9 @@ if (isset($_GET['ticket_id'])) { +
@@ -583,7 +586,7 @@ if (isset($_GET['ticket_id'])) {
-
+
@@ -604,7 +607,7 @@ if (isset($_GET['ticket_id'])) {
- +
@@ -630,10 +633,16 @@ if (isset($_GET['ticket_id'])) { +