From 545489ee107adc7b300a7436793a81f0ff96020a Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Fri, 27 Mar 2015 06:53:52 +0100 Subject: [PATCH] Added method to access mailbox properties --- src/Fetch/Server.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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. *