From e6f8fa2b4677f0814dd1b26402617d69ead97039 Mon Sep 17 00:00:00 2001 From: Jose Ignacio Date: Fri, 20 Mar 2015 11:11:35 +0100 Subject: [PATCH] make sure imap connection are reopened --- src/Mailbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mailbox.php b/src/Mailbox.php index 2ff98250..9096529f 100644 --- a/src/Mailbox.php +++ b/src/Mailbox.php @@ -136,7 +136,7 @@ public function addMessage($message) private function init() { $check = imap_check($this->connection->getResource()); - if ($check->Mailbox != $this->mailbox) { + if ($check === false || $check->Mailbox != $this->mailbox) { imap_reopen($this->connection->getResource(), $this->mailbox); } }