[TYPO3-core] Another patch request for t3lib_htmlmail

Stanislas Rolland stanislas.rolland at fructifor.ca
Wed Jan 25 23:42:24 CET 2006


Hi Michael,
> I have a few comments:
>
> 1. As it seems, your charset related fixes are not working yet:
>
> +                       // Default charset
> +               $this->charset = $this->charset ? $this->charset : 'iso-8859-1';
>   
I think it does. You need to set the charset variable of your instance 
of t3lib_htmlmail to the value you want it to use.
> Since I have a full patch ready for this, please remove the charset related
> stuff and wait for my next mail.
>   
Since you are working with a version of dmailer that will not be used in 
the next version of Direct mail, I am afraid that your patch may fail in 
the context of Direct Mail.
>
> 2. I don't like the hostname detection:
>
> -               $this->messageid = md5(microtime()).'@domain.tld';
> +               $localhost = gethostbyaddr('127.0.0.1');
> +               if (!$localhost || $localhost == '127.0.0.1' || $localhost ==
> 'localhost') $localhost = md5($TYPO3_CONF_VARS['SYS'
> ['sitename']).'.TYPO3';
> +               $this->innerMessageid = md5(microtime()) . '@' . $localhost;
>
> Please use the output of php_uname('n') instead.
What is wrong with the hostname detection? This has been tested on many 
installations for many months now, I would be hesitant to change it at 
this time.
> Do NOT md5sum it (hostname
> should be readable).
Can you guaranty that we will never get any characters that the RFC 
would consider illegal?
The RFC does not require a hostname of any kind. There is no requirement 
that it should be "readable". It requires a universally unique 
identifier. I think the proposed script is the best bet.
>  If the function returns nothing, append "localhost" as
> default workaround.
>   
This would not be compliant with the RFC requirements.
> You can use this funtion here because technically speaking, the mail is not
> sent by the Websites hostname but the servers hostname. So this should be
> correct.
>   
Any domain registered with the Internet registration authorities will 
do, because we know it will be unique, and this is what is important 
(and this is also why I cannot use localhost as default).
> 3. Why do you set $this->innerMessageid above? It's not used anywhere else.
> $this->messageid is also set, that should be enough.
>   
It is used in setHeaders(). t3lib_dmailer, as well as its replacement 
class in Direct Mail, may modify $this->messageid and may (I should say 
will) do so before the headers are set.

Regards,
Stanislas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060125/bfcbaaed/attachment.html 


More information about the TYPO3-team-core mailing list