From f4963cbc450f785d8af3ea706b89614e9e7ade44 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 10 Sep 2023 21:41:35 -0400 Subject: [PATCH] Change folder name for ITFlow Proessed mail to ITFlow and put in the root instead of INBOX Folder. Also dont flag all other mail --- cron_ticket_email_parser.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cron_ticket_email_parser.php b/cron_ticket_email_parser.php index 6768671e..35b59a77 100644 --- a/cron_ticket_email_parser.php +++ b/cron_ticket_email_parser.php @@ -314,7 +314,8 @@ if (!$imap) { } // Check for the ITFlow_Processed mailbox that we move messages to once processed -$imap_folder = 'INBOX/ITFlow_Processed'; +//$imap_folder = 'INBOX/ITFlow_Processed'; +$imap_folder = 'ITFlow'; $list = imap_list($imap, "{{$imap_mailbox}}", "*"); if (array_search("{{$imap_mailbox}}$imap_folder", $list) === false) { imap_createmailbox($imap, imap_utf7_encode("{{$imap_mailbox}}$imap_folder")); @@ -430,10 +431,11 @@ if ($emails) { // Deal with the message (move it if processed, flag it if not) if ($email_processed) { imap_mail_move($imap, $email, $imap_folder); - } else { - echo "Failed to process email - flagging for manual review."; - imap_setflag_full($imap, $email, "\\Flagged"); - } + } + //else { + // echo "Failed to process email - flagging for manual review."; + // imap_setflag_full($imap, $email, "\\Flagged"); + //} }