Esempio n. 1
0
 protected function testMessage()
 {
     $mail = new Mail(new DateTime('2009-02-13 15:47:25', new DateTimeZone('Europe/Paris')));
     $mail->addTo('*****@*****.**', 'John Doe');
     $mail->setText('test');
     return $mail;
 }
Esempio n. 2
0
 public function testSend()
 {
     $mail = new Mail();
     $mail->setFrom('root@localhost');
     $mail->addTo('root@localhost', 'John Doe');
     $mail->setText('test');
     $mail->setHtmlText('<b>test</b>');
     $this->assertTrue($mail->send($this->smtp));
 }
Esempio n. 3
0
    public function testSend()
    {
        $message = <<<EOT
Date: Fri, 13 Feb 09 15:47:25 +0100
MIME-Version: 1.0
To: John Doe <*****@*****.**>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit

test
EOT;
        $mail = new Mail($this->date);
        $mail->addTo('*****@*****.**', 'John Doe');
        $mail->setText('test');
        $this->assertEquals($message, $mail->send(new Transport\Dummy()));
    }