diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 32e57c1..a90c7e7 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -439,6 +439,16 @@ public function getMessageByUid($uid) } } + /** + * This function returns all the imap errors to prevent the following + * warning from imap_close and imap_expunge + * 'Unknown: Warning: MIME header encountered in non-MIME message (errflg=3)' + */ + public function getImapErrors() + { + return imap_errors(); + } + /** * This function removes all of the messages flagged for deletion from the mailbox. *