zend-mail
zend-mail copied to clipboard
$this->headers must be an instance of Headers
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.
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);
}
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.