![]() |
|
Snippets |
|
How to use sfMail to encode Body of Japanese Email.
The Japanese Email usually use ISO-2022-JP. But, I want to use UTF-8 of any Email template files. For example...
I create PROJECT_DIR/lib/myMail.class.php
myMail.class.php
<?php class myMail extends sfMail { public function setBody ($body) { parent::setBody(mb_convert_encoding($body, "JIS", "UTF-8")); } } ?>
OK, Use this class from your Action.
actions.class.php
public function executeSendmail() { $mail = new myMail(); .... }