note 99822 added to function.mail
| From: | Zane at MLI | Date: | Wed, 08 Sep 2010 22:17:34 +0000 |
| Subject: | note 99822 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172392@lists.php.net to get a copy of this message | ||
Italian users cursing against "Ã" and other uppercase-accented-vowels ("vocali
maiuscole accentate"") in subjects! While the lowercase ones ("è",
"é" and so on) work as expected, qmail doesn't handle the uppercase ones.
To fix it, the only way I found was this http://bitprison.net/php_mail_utf-8_subject_and_message
:
<?php
function mail_utf8($to, $subject = '(No subject)', $message = '', $header =
'') {
$header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain;
charset=UTF-8' . "\r\n";
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ .
$header);
}
?>
It should apply to other languages too.
----
Server IP: 69.147.83.197
Probable Submitter: 79.32.6.51
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/99822
Del: integrated -- https://master.php.net/note/delete/99822/integrated
Del: useless -- https://master.php.net/note/delete/99822/useless
Del: bad code -- https://master.php.net/note/delete/99822/bad+code
Del: spam -- https://master.php.net/note/delete/99822/spam
Del: non-english -- https://master.php.net/note/delete/99822/non-english
Del: in docs -- https://master.php.net/note/delete/99822/in+docs
Del: other reasons-- https://master.php.net/note/delete/99822
Reject -- https://master.php.net/note/reject/99822
Search -- https://master.php.net/manage/user-notes.php