[TYPO3-core] RFC: HTMLmail charset

Martin Kutschker Martin.Kutschker at blackbox.net
Wed Oct 19 22:33:00 CEST 2005


Bernhard Kraft <kraftb at kraftb.at> writes on 
Wed, 19 Oct 2005 18:50:21 +0200 (METDST):

> Hallo again,
> 
> This is a CVS patch request.
> 
> Type: Bugfix
> 
> Description:
> Until now HTML mails sent via class.t3lib_htmlmail (and it's derivates
> 
> t3lib_formmail and t3lib_dmailer) were always iso-8859-1. Simple 
> solution except for the Direct-Mailer where the charset needs to get
> extracted from the Page (How shall the BE know in which charset the
> page 
> gets's rendered in FE).
> 
> An option to overrule the htmlmail charset (for whatever reason) was 
> also added (config.htmlmailCharset)


The fix is broken.

The class has only "magic" (context sensitive) configuration.

The setting of plain_text_header and htlm_text_header should either be moved out of the constructor or the constructor must get an optional argument for the charset.

Don't get me wrong, getCharset() is ok by me, but I really miss the manual overide for the programmer.

Also alternate_charset can never be set except by extending the class.

getCharset() is called multiple times instead of just once. Why waste CPU cyles when you simply can store the rsult of this function?

I don't understand the changes to dmailer_prepare, but calling a constructor twice sounds like an ugly hack - and broken API.

Masi

PS: Please use one diff file per patched file. 



More information about the TYPO3-team-core mailing list