コード例 #1
0
 public function testGetMail()
 {
     $mail = $this->mailer->retrieveMail(4);
     $header = $mail->getMailHeader();
     $this->assertEquals($header->getSubject(), 'Test');
     $this->assertContains('Body Test', $mail->getBody());
     $attachments = $mail->getAttachments();
     $this->assertEquals($attachments->get(0)->getName(), 'test1');
     $this->assertEquals($attachments->get(1)->getName(), 'test2');
     $this->assertEquals($attachments->get(2)->getName(), 'test3');
     $this->mailer->close();
 }
コード例 #2
0
 /**
  * Get the mail by id in the list of mails
  *
  * @param integer $id The id of the mail
  * @return null|Mail\Mail
  */
 public function getMail($id)
 {
     return $this->mailer->retrieveMail($id);
 }