From 72eaf3d269ec807c5cf0f94ddfbeb978d340538e Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 26 Oct 2024 12:26:03 -0400 Subject: [PATCH] Email Ticket Parser: Fix Flagged Email from getting marked as read, use imap_store function to flag emails not processed as this function keeps the email as unread --- cron_ticket_email_parser.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cron_ticket_email_parser.php b/cron_ticket_email_parser.php index 8e063dda..a9be1503 100644 --- a/cron_ticket_email_parser.php +++ b/cron_ticket_email_parser.php @@ -483,7 +483,12 @@ if ($emails !== false) { imap_mail_move($imap, $email_number, 'ITFlow'); } else { // Flag the message for manual review - imap_setflag_full($imap, $email_number, "\\Flagged"); + + // 2024-10-26 - JQ - Sets the Flag but keeps the message unread + imap_store($imap, $email_number, "+FLAGS", "\\Flagged", ST_UID); + + // 2024-10-26 - JQ - Commented this function as it also marks the email as read. + //imap_setflag_full($imap, $email_number, "\\Flagged"); } // Delete the temporary message file