mirror of
https://github.com/itflow-org/itflow
synced 2026-03-05 21:34:51 +00:00
Change folder name for ITFlow Proessed mail to ITFlow and put in the root instead of INBOX Folder. Also dont flag all other mail
This commit is contained in:
@@ -314,7 +314,8 @@ if (!$imap) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for the ITFlow_Processed mailbox that we move messages to once processed
|
// 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}}", "*");
|
$list = imap_list($imap, "{{$imap_mailbox}}", "*");
|
||||||
if (array_search("{{$imap_mailbox}}$imap_folder", $list) === false) {
|
if (array_search("{{$imap_mailbox}}$imap_folder", $list) === false) {
|
||||||
imap_createmailbox($imap, imap_utf7_encode("{{$imap_mailbox}}$imap_folder"));
|
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)
|
// Deal with the message (move it if processed, flag it if not)
|
||||||
if ($email_processed) {
|
if ($email_processed) {
|
||||||
imap_mail_move($imap, $email, $imap_folder);
|
imap_mail_move($imap, $email, $imap_folder);
|
||||||
} else {
|
}
|
||||||
echo "Failed to process email - flagging for manual review.";
|
//else {
|
||||||
imap_setflag_full($imap, $email, "\\Flagged");
|
// echo "Failed to process email - flagging for manual review.";
|
||||||
}
|
// imap_setflag_full($imap, $email, "\\Flagged");
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user