public function deleteMailbox(Mirasvit_Ddeboer_Imap_Mailbox $mailbox) { if (false === imap_deletemailbox($this->resource, $this->server . $mailbox->getName())) { throw new Mirasvit_Ddeboer_Imap_Exception_Exception('Mailbox ' . $mailbox->getName() . ' could not be deleted'); } $this->mailboxes = $this->mailboxNames = null; }
/** * Move message to another mailbox. * * @param Mailbox $mailbox * * @throws MessageMoveException * * @return Message */ public function move(Mirasvit_Ddeboer_Imap_Mailbox $mailbox) { if (!imap_mail_move($this->stream, $this->messageNumber, $mailbox->getName())) { throw new Mirasvit_Ddeboer_Imap_MessageMoveException($this->messageNumber, $mailbox->getName()); } return $this; }