[TYPO3-core] Another patch request for t3lib_htmlmail

Michael Stucki michael at typo3.org
Wed Jan 25 09:39:04 CET 2006


Hi Stanislas,

> Description: Changes to t3lib_htmlmail:
> * Set standards-compliant messageid
> * Send htmlmails with any charset
> * Fix quoted-printable encoding
> * Fix issues 442, 776, 2053

Hmpf, seems you were faster than me. (Wanted to fix the same charset thingy
today evening...)

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';

Since I have a full patch ready for this, please remove the charset related
stuff and wait for my next 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. Do NOT md5sum it (hostname
should be readable). If the function returns nothing, append "localhost" as
default workaround.

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.

3. Why do you set $this->innerMessageid above? It's not used anywhere else.
$this->messageid is also set, that should be enough.

4. Line breaks: You are distincting between Windows servers where the
linebreak is \r\n and all others that use \n. Are you sure this is a
problem? Afaik, all systems are fine with the \n linebreak.

5. I agree with Jan-Erik that the quoted_printable function should stay in
t3lib_div only.

After all I see much things that have changed but I have the strong feeling
they are not solved correctly yet. May I ask you to wait with that change
and look at my next mail which is touching the same things. (Though I have
to check if it does the same like your fixed quoted_printable() function.)

Regards, michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/



More information about the TYPO3-team-core mailing list