Beispiel #1
0
    public function testSettingFromDefaults() {
        Mail\Mail::setDefaultFrom('*****@*****.**', 'John Doe');
        Mail\Mail::setDefaultReplyTo('*****@*****.**','Foo Bar');

        $mail = new Mail\Mail();
        $headers = $mail->setFromToDefaultFrom() // test fluent interface
                        ->setReplyToFromDefault()
                        ->getHeaders();

        $this->assertEquals('*****@*****.**', $mail->getFrom());
        $this->assertEquals('*****@*****.**', $mail->getReplyTo());
        $this->assertEquals('John Doe <*****@*****.**>', $headers['From'][0]);
        $this->assertEquals('Foo Bar <*****@*****.**>', $headers['Reply-To'][0]);
    }