[TYPO3] TCDirectmail UTF8 sybject header problem

Gideon So gideonso at livingwater.org.hk
Thu Jan 18 12:13:59 CET 2007


Hi Daniel,

	Thanks for the solution. I will do the patch and test it with Chinese.

Gideon

Daniel Schledermann wrote:

> I'm aware of the problem. We mainly have the problem with special latin
> characters such as åæø. The solution seem to be (as Dmitry proposed)
> using qouted-printable encoding with the mb_encode_mimeheader
> (http://www.php.net/manual/en/function.mb-encode-mimeheader.php) funtion.
> 
> In the meantime you can patch it yourself in
> class.tx_tcdirectmail_mailer.php around line 800, and replace this
> 
> /* Mail it */
> if ($sendmail_params) {
>  mail ($receiverRecord['email'], $this->title, implode("\n", $body),
> implode("\n", $headers), $sendmail_params);
> } else {
>  mail ($receiverRecord['email'], $this->title, implode("\n", $body),
> implode("\n", $headers));
> }
> 
> With this:
> 
> /* Mail it */
> $title = mb_encode_mimeheader($this->title, $charset, 'Q');
> 
> if ($sendmail_params) {
>   mail ($receiverRecord['email'], $title, implode("\n", $body),
> implode("\n", $headers), $sendmail_params);
> } else {
>   mail ($receiverRecord['email'], $title, implode("\n", $body),
> implode("\n", $headers));
> }
> 
> This change will have effect from the next release of tcdirectmail.
> 
> /Daniel (developer of tcdirectmail)


More information about the TYPO3-english mailing list