diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 1af1807..23b8459 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -443,13 +443,25 @@ class Server */ public function hasMailBox($mailbox) { - return (boolean) imap_getmailboxes( - $this->getImapStream(), - $this->getServerString(), - $this->getServerSpecification() . $mailbox - ); + 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 + ); + } + /** * Creates the given mailbox. *