Project

General

Profile

Actions

Bug #23955

closed

from_name should be quoted (at least when it's an e-mail address)

Added by Joost van Beurden over 13 years ago. Updated over 10 years ago.

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

0%

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

Description

I ran into this issue when the from address of e-mails sent by tx_powermail where rewritten by MS Exchange.
The from address appears as:

name@ [domain.com ]

This problem only occured when sending to an Exchange server. Mailboxes behind a postfix or qmail server didn't suffer from this issue. At this point, your conclusion could be that it's an Echange issue but I think otherwise.

After a few debugging sessions I found out that this issue triggered by the 'From:' header being formatted like this:

<>

I've read the different RFC's about e-mail address formatting, as far as I was able to understand them.

In RFC terminology this is: display-name <addr-spec>

If you follow the rules, an e-mail address is not allowed as the display-name because of the '@' sign. In that case the display-name should be quoted. It looks like MS Exchange adheres more to the RFC then other MTA's.

The most simple solution is to always quote the display-name and change this line:

$this->add_header('From: '.$this->from_name.' <'.$this->from_email.'>');

to

$this->add_header('From: "'.$this->from_name.'" <'.$this->from_email.'>');

Perhaps an extra check should be added to only do this when it's required by the RFC.

In this particular case the from_name was set to an e-mail address by the tx_powermail extension. Perhaps the problem should be solved from that end but I think the community should decide on that.

(issue imported from #M16266)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #22064: t3lib_htmlmail -> from_name in FROM header not quotedClosed2010-02-05

Actions
Actions

Also available in: Atom PDF