From 774cfb26482b25ba6e11017c1e86719ad22a3fdd Mon Sep 17 00:00:00 2001 From: Or Zilca Date: Tue, 26 May 2015 12:24:14 +0300 Subject: [PATCH] Fixed issue #74 imap_savebody() causing server error --- src/Fetch/Attachment.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Fetch/Attachment.php b/src/Fetch/Attachment.php index 613afda..431153f 100644 --- a/src/Fetch/Attachment.php +++ b/src/Fetch/Attachment.php @@ -218,6 +218,9 @@ class Attachment $streamFilter = null; } + // Fix an issue causing server to throw an error + // See: https://github.com/tedious/Fetch/issues/74 for more details + $fetch = imap_fetchbody($this->imapStream, $this->messageId, $this->partId ?: 1, FT_UID); $result = imap_savebody($this->imapStream, $filePointer, $this->messageId, $this->partId ?: 1, FT_UID); if ($streamFilter) {