Bug #60437
closedSenders name with special chars does not work in default form
100%
Description
Special chars like Umlaute ÄÖÜ in the senders name of a form are not displayed correctly in all mail clients. And the default hostname is always added, if special chars are used.
From line in test email:
From: "Test =?utf-8?Q?=C3=84=C3=96=C3=9C_=C3=9F_=C3=A4=C3=B6=C3=BC=22?= <Test123@example.org>"@hostname.hoster.org
Shows in Thunderbird like:
"Test ÄÖÜ ß äöü" "@hostname.hoster.org
Test ÄÖÜ ß äöü <Test123@example.org>@hostname.hoster.org
To work it should be:
From: Test =?utf-8?Q?=C3=84=C3=96=C3=9C_=C3=9F_=C3=A4=C3=B6=C3=BC?= <Test123@example.org>
Shows in Thunderbird like:
Test ÄÖÜ ß äöü
Test ÄÖÜ ß äöü <Test123@example.org>
The problem is the quotation in
typo3_src-6.2.1/typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php
Lines 141 - 143:
if (preg_match('/\\s|,/', $fromName) >= 1) { $fromName = '"' . $fromName . '"'; }
Blank chars in the senders name should be handled by Swift Mailer.
I think this lines can be removed.
Files
Updated by Markus Klein almost 10 years ago
Did you check with the swift mailer source whether it escapes the fromName correctly and does add the quotes?
Updated by Ayke Halder almost 10 years ago
No it doesn't add quotes, but escapes it correctly. Is there any need for quotes?
Example on http://swiftmailer.org/docs/messages.html
// Set the From address with an associative array ->setFrom(array('john@doe.com' => 'John Doe'))
No quotes here
Sending mails with Thunderbird does not set any quotes either.
http://www.ietf.org/rfc/rfc1342.txt
See pages 5 & 6 for examples, e.g.
CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard <PIRARD@vm1.ulg.ac.be>
This is the behaviour if lines 141 - 143 are removed:
Words containing special chars are encoded separately and no quotes are added at all.
Updated by Stefan Neufeind almost 10 years ago
Do you have a chance to check if the updated swiftmailer from master (5.2.1) maybe makes a difference? Thats not in the 6.2-tree though, just master (6.3 or so).
https://review.typo3.org/31572 - forge-issue #60227.
Updated by Ayke Halder almost 10 years ago
- File form_test_sender-name_with_special-chars-z.t3d form_test_sender-name_with_special-chars-z.t3d added
Checked it on TYPO3 6.3 master and no difference.
In the file is a simple example website to reproduce the problem.
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/33499
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33603
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 80adb509d2a27055a71d00fb88dccbfbecf5702c.