I'm having some difficulty with an Arabic website I'm working on. It has a standard PHP mailform, and the problem is with the "from" header (...the message seems to work ok)
I started off with the standard php mail function, but after searching for an answer I thought that this code would work. However, the name still does not display correctly when the mail arrives.
Have any of you ever encountered this problem? I'd appreciate your input..
$name = (an Arabic word);
$name = mb_encode_mimeheader($name, "UTF-8", "B");
$headers = "Mime-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain;charset=utf-8\r\n";
$headers .= "From: $name";
mb_send_mail("email@example.com", "From Your Mailform", "This message was sent from your website:\n\n$message", "$headers" );