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