Bug #22064
closedt3lib_htmlmail -> from_name in FROM header not quoted
0%
Description
Currently the from_name property isn't quoted inside the FROM header of the t3lib_htmlmailer. This causes problems if for example a comma appears in the from_name. As a result the the left part and right part of the from_name will be treates as different email adresses.
The solution is to set the from_name into a pair of " characters. Please have a look at the attached patch...
(issue imported from #M13435)
Files
Updated by Stefan Galinski over 13 years ago
The htmlmailer was replaced by swiftmailer in version 4.5. The patch doesn't fixes all situations with wrong characters and should not be applied to previous releases in this way.
Updated by Daniel Minder over 13 years ago
- Target version deleted (
0)
Although htmlmail is marked as deprecated htmlmail is still used in many extensions, e.g. sr_feuser_register. Therefore, this error should be fixed unless htmlmail is removed soon.
In my opinion, a correct fix would be:
$this->add_header('From: "' . addslashes($this->from_name) . '" <' . $this->from_email . '>');
since this enables the use of all characters that must appear in a quoted-string and must not appear in an atom according to RFC822.
The problem is that if you enable the use of swiftmailer through htmlmail the "From" line is checked by swiftmailer and if e.g. a "." appears in the from_name an exception is thrown!
Updated by Markus Klein almost 11 years ago
- Status changed from New to Accepted
- Is Regression set to No
Updated by Mathias Schreiber almost 10 years ago
- Status changed from Accepted to Resolved
fixed by moving to swiftmailer