From 8f96aef73c2db22295c7f2f9c3c3925590892ba9 Mon Sep 17 00:00:00 2001 From: sebh Date: Thu, 4 Oct 2012 12:04:34 +0200 Subject: [PATCH] Fix imap_reopen 'mailbox not found' error When this method was called and tried to reopen the imap connection, an error was thrown because the second argument must be the complete mailbox path and not only mailbox name (http://lu.php.net/manual/fr/function.imap-reopen.php). --- src/Fetch/Server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 308329a..346bea1 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -260,7 +260,7 @@ class Server { if(isset($this->imapStream)) { - if(!imap_reopen($this->imapStream, $this->mailbox, $this->options, 1)) + if(!imap_reopen($this->imapStream, $this->getServerString(), $this->options, 1)) throw new \RuntimeException(imap_last_error()); }else{ $imapStream = imap_open($this->getServerString(), $this->username, $this->password, $this->options, 1);