Search code examples
phpzend-frameworkimapzend-mail

mark message as unseen using Zend


i'm using Zend_Mail_Storage_Imap to ream emails.

In some special case, after iv'e read the message, i want to mark it as unread again.

how can i do that in zend framework?

Thanks, Boris.


Solution

  • I'm afraid I don't have access to the code I used this in, but something along the lines of the following rings a bell:

    foreach ($mail as $message_id => $message) {
        $mail->setFlags(
            $mail->getNumberByUniqueId($mail->getUniqueId($message_id)),
            array(Zend_Mail_Storage::FLAG_RECENT)
        );
    }