note 29747 added to function.mb-send-mail
| From: | N03L at rack1 dot php dot net | Date: | Mon, 24 Feb 2003 03:29:35 +0000 |
| Subject: | note 29747 added to function.mb-send-mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44415@lists.php.net to get a copy of this message | ||
First of all, don't use nl2br in newer php versions unless you WANT to write
xhtml...you'll get <br /> tags.
Secondly, you should use JIS, not ISO-2022-JP as the convert TO encoding. If you use ISO...
mb_encode_mimeheader seems to fail. They're the same charset anyway.
Now here's why I am really writing. I just discovered that mb_send_mail and
mb_encode_mimeheader cannot support hankaku (single byte kana in (S)JIS) at all. If you are making
apps for the keitai (mobile) market, this won't do. Therefore, undo your overloading on the
mail function and use regular mail and convert everything yourself like this. This is what we did.
It seems to work for us. Your mileage may vary.
$strMBS = mb_convert_encoding($strMailBodySend, "JIS", "EUC-JP");
$strMS = mb_encode_mimeheader( mb_convert_encoding($strMailSubj, "JIS",
"EUC-JP") );
mail($strToMail, $strMS, $strMBS, $strFrom);
--
http://www.php.net/manual/en/function.mb-send-mail.php
http://master.php.net/manage/user-notes.php?action=edit+29747
http://master.php.net/manage/user-notes.php?action=delete+29747
http://master.php.net/manage/user-notes.php?action=reject+29747