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 about 14 years ago. Updated almost 11 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 #1

Updated by Joost van Beurden about 14 years ago

After giving it a little bit more thought, I guess this should be fixed in the tx_powermail extension. What do you think?

This would be the fix in typo3conf/ext/powermail/pi1/class.tx_powermail_submit.php:

- $this->htmlMail->from_name = $this->maildata['sendername']; // sender email name
+ $this->htmlMail->from_name = '"'.$this->maildata['sendername'].'"'; // sender email name

Actions #2

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.4
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Markus Klein almost 11 years ago

  • Status changed from Needs Feedback to Closed

Closing as duplicate of #22064

Actions

Also available in: Atom PDF