php-imap-client icon indicating copy to clipboard operation
php-imap-client copied to clipboard

getUnreadMessages($read = true) always marked as unseen

Open gomcodoctor opened this issue 7 years ago • 0 comments

getUnreadMessages($read = true)

$read = true will not work because

protected function imapFetchbody($section)
    {
        /*
     * Update note: We must add FT_PEEK to perserve the unread status of the email.
     * Documentation of this can see seen here: http://php.net/manual/en/function.imap-fetchbody.php under options
     */
        return imap_fetchbody($this->imapStream, $this->id, $section, FT_PEEK );
    }

FT_PEEK is set, which will always mark message as unseen

gomcodoctor avatar Oct 24 '18 18:10 gomcodoctor