Fixed issue #74

imap_savebody() causing server error
This commit is contained in:
Or Zilca 2015-05-26 12:24:14 +03:00
parent 6a6d909c17
commit 774cfb2648

View File

@ -218,6 +218,9 @@ class Attachment
$streamFilter = null; $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); $result = imap_savebody($this->imapStream, $filePointer, $this->messageId, $this->partId ?: 1, FT_UID);
if ($streamFilter) { if ($streamFilter) {