Project

General

Profile

Actions

Bug #90320

closed

Swift_RfcComplianceException for invalid email in MailMessage->setTo()

Added by Stephan Großberndt almost 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2020-02-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There is a bug in the swiftmailer implementation in TYPO3 9.5 and 8.7:

GeneralUtility::makeInstance(MailMessage::class)
->setFrom('foo@bar.org')
->setTo('foo@ba r.org')
->setSubject('subject)
->setBody('body')
->send();

throws a Swift_RfcComplianceException

Address in mailbox given [foo@ba r.org] does not comply with RFC 2822, 3.6.2.

Swift_RfcComplianceException thrown in file
/typo3_src-8.7.30/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php in line 345.

In method MailMessage::send() a Swift_RfcComplianceException would be caught by Mailer::send() and add it to the list of $failedRecipients but MailMessage::setTo() does not.

TYPO3 v10 no longer contains the swiftmailer implementation.

Actions

Also available in: Atom PDF