lib/Util.php
public function getUnprocessedMails($markProcessed = true, \Closure $callbackFunction = null)
    {
        $search = ' NOT KEYWORD "'.ImapHelper::PROCESSED_FLAG.'"';

        return $this
            ->imapHelper
            ->fetchMails(
                $this->imapAdapter,
                $search,
                $markProcessed,
                true,
                $callbackFunction
            );
    }
public function getUnprocessedMails($markProcessed = true, \Closure $callbackFunction = null)
    {
        $search = ' NOT KEYWORD "'.ImapHelper::PROCESSED_FLAG.'"';

        return $this
            ->imapHelper
            ->fetchMails(
                $this->imapAdapter,
                $search,
                $markProcessed,
                true,
                $callbackFunction
            );
    }
@param bool     $markProcessed
@param \Closure $callbackFunction

@return array