zend-mail icon indicating copy to clipboard operation
zend-mail copied to clipboard

$this->headers must be an instance of Headers

Open r0073rr0r opened this issue 8 years ago • 2 comments

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.

r0073rr0r avatar Aug 18 '17 14:08 r0073rr0r

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('[email protected]')
                ->setSender('[email protected]', 'Ralph Schindler')
                ->setBody('This is only a test.');

        $this->transport->send($message);
    }

samsonasik avatar May 06 '18 02:05 samsonasik

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.

michalbundyra avatar Jan 15 '20 19:01 michalbundyra