Re: mail-command and UTF-8
| From: | Darren Cook | Date: | Sun, 08 Mar 2009 07:34:56 +0000 |
| Subject: | Re: mail-command and UTF-8 | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-1304@lists.php.net to get a copy of this message | ||
> $subject = mb_encode_mimeheader($subject,
> mb_internal_encoding(),"B","\n");
> return mail('r.bloeth@gosub.de', $subject, $message, $header);
Sorry, I missed this earlier: if you have mb_encode_mimeheader() then
you also have mb_send_mail(), which does all the hard work for you.
http://php.net/mb_send_mail
http://jp.php.net/mb_language
So, this might replace almost (*) everything you wrote:
mb_language('uni');
mb_send_mail('r.bloeth@gosub.de', $subject, $message);
Darren
*: Except the reply-to header. You can add that: mb_send_mail() takes
the same optional 4th parameter as mail().