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).
This commit is contained in:
sebh 2012-10-04 12:04:34 +02:00
parent 3f5cd124e3
commit 8f96aef73c

View File

@ -260,7 +260,7 @@ class Server
{ {
if(isset($this->imapStream)) 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()); throw new \RuntimeException(imap_last_error());
}else{ }else{
$imapStream = imap_open($this->getServerString(), $this->username, $this->password, $this->options, 1); $imapStream = imap_open($this->getServerString(), $this->username, $this->password, $this->options, 1);