diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index c5c9ced..a4cf684 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -443,7 +443,19 @@ class Server */ public function hasMailBox($mailbox) { - return (boolean) imap_getmailboxes( + return (boolean) $this->getMailBoxDetails($mailbox); + } + + /** + * Return information about the mailbox or mailboxes + * + * @param $mailbox + * + * @return bool + */ + public function getMailBoxDetails($mailbox) + { + return imap_getmailboxes( $this->getImapStream(), $this->getServerString(), $this->getServerSpecification() . $mailbox