Bug #69208
closedMail address with UTF-8 smilie validates
100%
Description
A mail address like "john.doe@☺gmail.com" will return TRUE
if passed to GeneralUtility::validEmail()
. But if I try to set it as sender or receiver it throws a Swift_RfcComplianceException
"Address in mailbox given [john.doe@☺gmail.com] does not comply with RFC 2822, 3.6.2.".
Updated by Morton Jonuschat about 9 years ago
- Status changed from New to On Hold
GeneralUtility::validEmail() is actually correct as the smiley in the domain name is valid as long as it's punycode encoded. There's an open bug report/feature request regarding IDN Support for SwiftMailer: https://github.com/swiftmailer/swiftmailer/issues/63
We need to wait on SwiftMailer to fix this.
Updated by Felix Heller about 9 years ago
At the TYPO3camp Munich 2015, we tried to fix this bug and thought that the best solution was to extend the default methods setTo
, setFrom
etc. in \TYPO3\CMS\Core\Mail\MailMessage\
and execute a IDNA encoding like in GeneralUtility::validEmail
:
if (!preg_match('/^[a-z0-9.\\-]*$/i', $domain)) {
$domain = self::idnaEncode($domain);
}
It seems like the IDNA encoded domain could pass the validation methods of SwiftMailer.
Updated by Riccardo De Contardi about 9 years ago
- Status changed from On Hold to New
Unlocked after discussion held on TYPO3camp Munich 2015; \TYPO3\CMS\Core\Mail\MailMessage
should be adapted to fix this problem
Updated by Morton Jonuschat about 9 years ago
- Status changed from New to In Progress
- Assignee set to Morton Jonuschat
- Target version set to 7.5
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review about 9 years ago
- Status changed from In Progress 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 http://review.typo3.org/43294
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Updated by Gerrit Code Review about 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Updated by Gerrit Code Review about 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Updated by Morton Jonuschat about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1cd0c99f66a4cd076808f4f019ea52b9d55cede2.
Updated by Anja Leichsenring almost 9 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed