Added method to access mailbox properties

This commit is contained in:
Ben Roberts 2015-03-27 06:53:52 +01:00
parent b5b790ea75
commit 545489ee10

View File

@ -443,7 +443,19 @@ class Server
*/ */
public function hasMailBox($mailbox) 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->getImapStream(),
$this->getServerString(), $this->getServerString(),
$this->getServerSpecification() . $mailbox $this->getServerSpecification() . $mailbox