zendframework / zend-mail

Mail component from Zend Framework
BSD 3-Clause "New" or "Revised" License
96 stars 111 forks source link

$this->headers must be an instance of Headers #167

Open r0073rr0r opened 7 years ago

r0073rr0r commented 7 years ago

If subject is NULL (mail have no subject) I got this exception

$this->headers must be an instance of Headers

Need to handle NULL subject without error/exception.

samsonasik commented 6 years ago

Please provide code and/or unit test to reproduce the error. I tried the following test and it works:

    public function testAllowMessageWithEmptySubject()
    {
        $message = new Message();
        $message->addTo('matthew@zend.com')
                ->setSender('ralph.schindler@zend.com', 'Ralph Schindler')
                ->setBody('This is only a test.');

        $this->transport->send($message);
    }
michalbundyra commented 4 years ago

This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/42.