From 93bb5db01971e97b383a38ea7dda61b5500a33e1 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Wed, 15 Oct 2025 21:56:21 +0100 Subject: [PATCH 1/2] typo --- agent/post/certificate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/post/certificate.php b/agent/post/certificate.php index 60b4e4e7..6f33865a 100644 --- a/agent/post/certificate.php +++ b/agent/post/certificate.php @@ -120,7 +120,7 @@ if (isset($_GET['archive_certificate'])) { mysqli_query($mysqli,"UPDATE certificates SET certificate_archived_at = NOW() WHERE certificate_id = $certificate_id"); - logAction("Certificate", "Archive", "$session_name arhvived certificate $certificate_name", $client_id, $certificate_id); + logAction("Certificate", "Archive", "$session_name archived certificate $certificate_name", $client_id, $certificate_id); flash_alert("Certificate $certificate_name archived", 'alert'); From 5dd4f5ea62799260de98b24e25c7498b6874bf7b Mon Sep 17 00:00:00 2001 From: wrongecho Date: Thu, 16 Oct 2025 16:32:37 +0100 Subject: [PATCH 2/2] New mail parser: - bugfix .eml not being generated - include the message when notifying the tech of a reply --- cron/ticket_email_parser.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cron/ticket_email_parser.php b/cron/ticket_email_parser.php index d82b115c..2c5e7b71 100644 --- a/cron/ticket_email_parser.php +++ b/cron/ticket_email_parser.php @@ -284,7 +284,7 @@ function addReply($from_email, $date, $subject, $ticket_number, $message, $attac $tech_name = sanitizeInput($tech_row['user_name']); $email_subject = "$config_app_name - Ticket updated - [$config_ticket_prefix$ticket_number] $ticket_subject"; - $email_body = "Hello $tech_name,

A new reply has been added to the below ticket, check ITFlow for full details.

Client: $client_name
Ticket: $config_ticket_prefix$ticket_number
Subject: $ticket_subject

https://$config_base_url/agent/ticket.php?ticket_id=$ticket_id"; + $email_body = "Hello $tech_name,

A new reply has been added to the below ticket.

Client: $client_name
Ticket: $config_ticket_prefix$ticket_number
Subject: $ticket_subject
Link: https://$config_base_url/agent/ticket.php?ticket_id=$ticket_id

--------------------------------
$message_esc"; $data = [ [ @@ -546,17 +546,10 @@ $unprocessed_count = 0; foreach ($messages as $message) { $email_processed = false; - // Save original RFC822 message as .eml + // Save original message as .eml (getRawMessage() doesn't seem to work properly) mkdirMissing('../uploads/tmp/'); $original_message_file = "processed-eml-" . randomString(200) . ".eml"; - - try { - // getRawMessage() available in v3; for v2 use getHeader()->raw or getStructure()? We'll try getRawMessage() - $raw_message = $message->getRawMessage(); - } catch (\Throwable $e) { - // Fallback to rebuilding from headers + body if raw not available - $raw_message = (string)$message->getHeader()->raw . "\r\n\r\n" . ($message->getRawBody() ?? $message->getHTMLBody() ?? $message->getTextBody()); - } + $raw_message = (string)$message->getHeader()->raw . "\r\n\r\n" . ($message->getRawBody() ?? $message->getHTMLBody() ?? $message->getTextBody()); file_put_contents("../uploads/tmp/{$original_message_file}", $raw_message); // From