Exemplo n.º 1
0
 public function testGetName()
 {
     $this->assertStringStartsWith('test-mailbox', $this->mailbox->getName());
 }
Exemplo n.º 2
0
 /**
  * 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;
 }
Exemplo n.º 3
0
 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;
 }