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(); }
/** * 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); }