public function setUp() { $this->mailHeader = new Headers(array('msgno' => '125545d4f5d', 'to' => '*****@*****.**', 'from' => 'Jose Luis Cardosa Manzano <*****@*****.**>', 'reply' => 'Jose Luis Cardosa Manzano <*****@*****.**>', 'subject' => 'Pruuueba', 'udate' => '19586575518', 'unseen' => 'U', 'size' => '1024')); $this->mailBody = 'Body with attachmentes'; $this->mailAttachments = new Collection(array(new Attachment('prueba1', 'Content of attachment1', 'txt', '1024'), new Attachment('prueba2', 'Content of attachment2', 'txt', '2048'), new Attachment('prueba3', 'Content of attachment3', 'txt', '4096'))); $this->mail = new Mail(); $this->mail->setMailHeader($this->mailHeader); $this->mail->setBody($this->mailBody); $this->mail->setAttachments($this->mailAttachments); }
/** * Return selected mail * * @param string $id email identifier * * @return null|Mail */ public function retrieveMail($id) { $mail = new Mail(); $mail->setMailHeader($this->retrieveHeaders($id)); $mail->setBody($this->retrieveBody($id)); $mail->setAttachments($this->retrieveAttachments($id)); return $mail; }