Bug #90040
closedMailer::send sets replyTo Address in wrong order (name as mail and vice versa)
100%
Description
/typo3/sysext/core/Classes/Mail/Mailer.php:108
$replyTo = MailUtility::getSystemReplyTo();
...
$replyTo = new Address(reset($replyTo), $address);
Line 108 is setting "new Address
" as replyTo using the value of the array as address and $address as name.
Issue:
The array returned from MailUtility::getSystemReplyTo()
is different depending on defaultMailReplyToName
is being set in $GLOBALS['TYPO3_CONF_VARS']['MAIL']
.
When set, address is key and name is value. When not set address is value.
if (!empty($mailConfiguration['defaultMailReplyToName'])) {
$replyTo = [$replyToAddress => $mailConfiguration['defaultMailReplyToName']];
} else {
$replyTo = [$replyToAddress];
}
reset($replyTo)
therefore returns the name when defaultMailReplyToName
is filled leading to invalid RFC validation and exception when sending mail:
RFC compliance problem
Please verify $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] is a valid mail address. Error message: Email "ACME" does not comply with addr-spec of RFC 2822.
Updated by Sven Nußbaum almost 5 years ago
- Target version changed from Candidate for Major Version to next-patchlevel
- Complexity set to easy
Updated by Gerrit Code Review almost 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62836
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62836
Updated by Gerrit Code Review almost 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62836
Updated by Benni Mack almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 953e1b3480c7566bf14bd1750fe1fdeeb3c3c26c.