lib/ImapHelper.php
protected function markProcessed(ImapAdapter $imap, $id, Message $message = null)
    {
        $flags   = $message ? $message->getFlags() : [];
        $flags[] = self::PROCESSED_FLAG;

        try {
            $imap->setFlags($id, $flags);
        } catch (ExceptionInterface $e) {
            // Nothing to do
        }
    }
protected function markProcessed(ImapAdapter $imap, $id, Message $message = null)
    {
        $flags   = $message ? $message->getFlags() : [];
        $flags[] = self::PROCESSED_FLAG;

        try {
            $imap->setFlags($id, $flags);
        } catch (ExceptionInterface $e) {
            // Nothing to do
        }
    }
Marks the mail with the processed flag

@param ImapAdapter $imap
@param integer     $id
@param Message     $message