From 61ac0f64ca37f4f67dd7a0471bc693879e973353 Mon Sep 17 00:00:00 2001 From: Prestaspirit Date: Thu, 11 Jun 2015 22:01:59 +0200 Subject: [PATCH] Update Message.php Hi, I justa added FT_PEEK flag for the seen flag is not added automatically when calling the method processStructure while the message was not read --- src/Fetch/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 3c042c5..539f417 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -513,8 +513,8 @@ class Message $this->attachments[] = $attachment; } elseif ($structure->type == 0 || $structure->type == 1) { $messageBody = isset($partIdentifier) ? - imap_fetchbody($this->imapStream, $this->uid, $partIdentifier, FT_UID) - : imap_body($this->imapStream, $this->uid, FT_UID); + imap_fetchbody($this->imapStream, $this->uid, $partIdentifier, FT_UID | FT_PEEK) + : imap_body($this->imapStream, $this->uid, FT_UID | FT_PEEK); $messageBody = self::decode($messageBody, $structure->encoding);