Pages

Saturday, February 07, 2009

Zend framework mail: broken kanji

I'm using Zend framework for most of my web projects at work. One of the must-have features is must be able to send email either scheduled routinely using cron or executed manually from the web. Somehow, I found that on certain web based email clients the contents of the email with Japanese kanji is unreadable.

I'm quite surprised that after doing many trial and errors converting the encoding type, the solution is very straightforward. Simply add a line to the header of the email contains MIME-Version information as follows:
$class->addHeader('MIME-Version','1.0');

But I still don't know why it should be added manually.. :S

That's all :)

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete