Project

General

Profile

Actions

Bug #22064

closed

t3lib_htmlmail -> from_name in FROM header not quoted

Added by Stefan Galinski over 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-02-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

typo3_13435.patch (634 Bytes) typo3_13435.patch Administrator Admin, 2010-02-05 15:37
13435_v1.diff (566 Bytes) 13435_v1.diff Administrator Admin, 2010-02-05 15:37
13435_v5.diff (1.73 KB) 13435_v5.diff Administrator Admin, 2010-02-17 21:09

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #17505: Output of class.t3lib_htmlmail.php is not standard compliantClosed2007-08-08

Actions
Has duplicate TYPO3 Core - Bug #23955: from_name should be quoted (at least when it's an e-mail address)Closed2010-11-05

Actions
Actions #1

Updated by Stefan Galinski about 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.

Actions #2

Updated by Daniel Minder almost 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!

Actions #3

Updated by Markus Klein over 10 years ago

  • Status changed from New to Accepted
  • Is Regression set to No
Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Status changed from Accepted to Resolved

fixed by moving to swiftmailer

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF