note 58608 deleted from ref.mail by didou
| From: | didou@php.net | Date: | Sun, 23 Apr 2006 22:34:03 +0000 |
| Subject: | note 58608 deleted from ref.mail by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109208@lists.php.net to get a copy of this message | ||
Note Submitter: remo at tourist dot sk
----
i spent 4 hours finding out how to send UTF-8 plain text mail, so here is my working sollution (PHP
5, Debian):
<?php
$subject = "subject";
$message = "message"
//dont forget quotes around "name", else it won't be displayed correctly in utf-8
$from = "From: \"".$_POST['name']."\"
<".$_POST['mail'].">";
mb_language('Neutral');
mb_internal_encoding("UTF-8");
mb_http_input("UTF-8");
mb_http_output("UTF-8");
mb_send_mail($to, $subject, $message, $from);
?>
hopefully this will be usefull for someone..