[TYPO3-core] RFC #16911: Restructure of t3lib_utility_Mail hook subscriber

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jan 13 11:22:19 CET 2011


Hi,

REMINDER! Would be important to have this done and fixed.

Cheers,
Ernesto

Ernesto Baschny [cron IT] schrieb am 10.01.2011 19:17:
> Jigal van Hemert schrieb am 10.01.2011 15:12:
>> Hi,
>>
>> On 10-1-2011 12:55, Ernesto Baschny [cron IT] wrote:
>>> To make it sure that it parses correctly, I made a quick unit test
>>> for the parseAddresses method.
>>
>> I wonder how far we should go with being RFC2822 compliant in this
>> little helper function. [1] describes the address lists in RFC822 (the
>> predecessor), but it is rather complex if we want to support all features.
>> ATM we can't handle
>> "Lastname, Firstname" <name at example.org>, another at example.org
> 
> That's true, I thought we needed just the situations that come from
> t3lib_htmlmail, where "From" is just combined:
> 
>    $this->add_header('From: ' . $this->from_name . ' <' .
> $this->from_email . '>');
> 
> But of course mail() might also be called (by extensions) directly with
> some addresses which might not even be RFC conforming.
> 
> There is a pretty complete PEAR class which parses RFC mailboxes
> already: Mail/RFC822.php [1]. Since we cannot trust on PEAR "Mail" being
> present, we must ship this functionality with the core. Licensing is
> "New BSD License" [2]. This seems to be compatible with the GPLv2, as
> this doesn't include the old "advertising clause" that the made the
> original BSD license incompatible with GPL (see [3]). Right?
> 
> Adding that and adding more complex mail-addresses (like the one you
> mentioned), made everything green again in the unit tests. Check it out
> in the attached v3.
> 
> Note: It's a shame that we still need to support
> t3lib_utility_mail::mail(), but of course we need to, because we cannot
> expect everyone to start using SwiftMail from the start. But in 4.5 we
> should then deprecate:
> 
> - t3lib_htmlmail
> - t3lib_utility_mail::mail
> - t3lib_mail_rfc822addressesparser
> 
> So that we can remove those all together in 4.7.
> 
> Cheers,
> Ernesto
> 
> [1]
> http://pear.php.net/manual/en/package.mail.mail-rfc822.parseaddresslist.php
> [2] http://opensource.org/licenses/bsd-license.php
> [3] http://www.gnu.org/philosophy/bsd.html



More information about the TYPO3-team-core mailing list