[TYPO3-core] RFC: #8522 Problems with PHP mail function on Windows

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sun May 4 20:52:37 CEST 2008


Dmitry Dulepov [typo3] schrieb:
> Dmitry Dulepov [typo3] wrote:
>> After looking to this issue I think we need a bit different solution. 
>> This patch will work but not for all cases. It is possible to call 
>> t3lib_htmlmail in several different ways and patch fixes only some of 
>> them.
>>
>> Also there is t3lib_div::plainMailEncoded(), which has the same 
>> problem. I think we need a system wide solution.
>>
>> I got mini_sendmail on my local computer and I think we can make 
>> another patch during t3dd08 and include it to 4.1.7 and 4.2.1.
> 
> I made the patch actually... Attaching it here and to BT entry. Testing 
> instructions are in BT.

I didn't test the patch but problem analysis and code look good.

Two notes:

First, IMHO escapeshellarg() is a better choice then addslashes().

Second, it's a pity that t3lib_div gets bloated once more. I would 
favour a rewrite of the TYPO3 mail classes (a split into utilities, 
compliation, sending and parsing). I have an idea for 
t3lib_div::makeInstance that would get us singletons easily which allows 
us to move t3lib_div stuff to various utility classes.

Masi


More information about the TYPO3-team-core mailing list