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,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.
*