As you can probably tell, I'm working on some IMAP stuff and having a couple of problems. My latest problem entails using imap_search.

If I search using imap_search like this:

$result = imap_search($mailbox, "RECENT FROM \"$email\"");

it returns all the messages with their \Recent flag set.

If I subsequently run the script again, it returns the SAME message list.
Note: imap_close is called at the end of the script.

Doesn't each imap_open denote a new session and shouldn't the search
observe the lack of the \Recent flag on the messages that gets reset after
the message is opened? The \Recent flag CAN NOT be set using imap_setflag_full,
however, I am using this:

imap_setflag_full($mailbox, "$index", "\Seen \Flagged");

Even if I search for UNSEEN, it still returns the same message list.

Is there something I'm missing?

    Seems that POP3 mailboxes have serious problems with these flags.
    Guess I'm going to have to do something different.

      Write a Reply...