Project

General

Profile

Actions

Bug #89083

closed

MailMessage setFrom and setTo are throwing exceptions

Added by Sebastian Fischer about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Miscellaneous
Target version:
-
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('');
Exception -> An address can be an instance of Address or a string ("NULL") given).

$mail->setFrom('', 'bbb');
Exception -> Email "bbb" does not comply with addr-spec of RFC 2822.

$mail->setFrom(['' => 'bbb']);
Exception -> An address can be an instance of Address or a string ("array") given).

$mail->setTo(['' => 'aaa']);
Exception -> An address can be an instance of Address or a string ("array") given).


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #88702: EmailFinisher - Recipients - Cannot unpack array with string keysClosed2019-07-08

Actions
Related to TYPO3 Core - Feature #88643: Replace SwiftMailer with Symfony/MailerClosedBenni Mack2019-07-05

Actions
Related to TYPO3 Core - Bug #89379: Emails sending doesn't work using MailMessageClosed2019-10-09

Actions
Actions

Also available in: Atom PDF