예제 #1
0
파일: SmtpTest.php 프로젝트: Kervinou/OBM
 public function test_send()
 {
     $mail = new SMail();
     $mail->set_from('root@localhost');
     $mail->add_to('root@localhost', 'John Doe');
     $mail->set_text('test');
     $mail->set_html_text('<b>test</b>');
     $this->assertTrue($mail->send($this->smtp));
 }
예제 #2
0
파일: MailTest.php 프로젝트: Kervinou/OBM
    public function test_send()
    {
        $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 SMail($this->date);
        $mail->add_to('*****@*****.**', 'John Doe');
        $mail->set_text('test');
        $this->assertEquals($message, $mail->send(new SDummyTransport()));
    }