mirror of https://github.com/itflow-org/itflow
Fix Replicating email opps
This commit is contained in:
parent
65cf8519d0
commit
080a79c59d
|
|
@ -444,14 +444,8 @@ 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) {
|
||||||
// Verify if the email has been moved
|
imap_setflag_full($imap, $email, "\\Seen");
|
||||||
$moved_email_check = imap_search($imap, "SUBJECT \"$subject\" IN $imap_folder");
|
imap_mail_move($imap, $email, $imap_folder);
|
||||||
if ($moved_email_check && count($moved_email_check) > 0) {
|
|
||||||
imap_setflag_full($imap, $email, "\\Seen");
|
|
||||||
imap_mail_move($imap, $email, $imap_folder);
|
|
||||||
} else {
|
|
||||||
echo "Failed to move the email: $subject";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
echo "Failed to process email - flagging for manual review.";
|
echo "Failed to process email - flagging for manual review.";
|
||||||
imap_setflag_full($imap, $email, "\\Flagged");
|
imap_setflag_full($imap, $email, "\\Flagged");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue