Project

General

Profile

Actions

Bug #90040

closed

Mailer::send sets replyTo Address in wrong order (name as mail and vice versa)

Added by Sven Nußbaum over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
Start date:
2019-12-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
mailer, rfc
Complexity:
easy
Is Regression:
Sprint Focus:

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.
Actions #1

Updated by Sven Nußbaum over 4 years ago

  • Target version changed from Candidate for Major Version to next-patchlevel
  • Complexity set to easy
Actions #2

Updated by Sven Nußbaum over 4 years ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review over 4 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

Actions #4

Updated by Gerrit Code Review over 4 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

Actions #5

Updated by Gerrit Code Review over 4 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

Actions #6

Updated by Benni Mack over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF