#89083MailMessage setFrom and setTo are throwing exceptions
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).