Actions
Bug #89083
closedMailMessage setFrom and setTo are throwing exceptions
Start date:
2019-09-04
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Both setFrom and setTo are not working as documented.
$mail = $this->objectManager->get(\TYPO3\CMS\Core\Mail\MailMessage::class);
$mail->setFrom('test2@fischer.im');
Exception -> An address can be an instance of Address or a string ("NULL") given).
$mail->setFrom('test2@fischer.im', 'bbb');
Exception -> Email "bbb" does not comply with addr-spec of RFC 2822.
$mail->setFrom(['test2@fischer.im' => 'bbb']);
Exception -> An address can be an instance of Address or a string ("array") given).
$mail->setTo(['test1@fischer.im' => 'aaa']);
Exception -> An address can be an instance of Address or a string ("array") given).
Actions