my site is utf-8 encoded and formmal is using an HTML templates which is also utf-8 encoded. everything was great except the From Header was not utf-8 encoded and names written in utf-8 encoded arabic characters would come up as garbled text in Outlook.
to fix this, and have the name in From Header utf-8 encoded, change this, starting around line 7666:
PHP Code:
function MakeFromLine($s_email,$s_name)
{
$s_line = "";
if (!empty($s_email))
$s_line .= $s_email." ";
if (!empty($s_name))
$s_line .= "(".$s_name.")";
return ($s_line);
}
to this:
PHP Code:
function MakeFromLine($s_email,$s_name)
{
$s_line = "";
if (!empty($s_email))
$s_line .= $s_email." ";
if (!empty($s_name))
$s_line .= "(=?utf-8?B?".base64_encode($s_name)."?=)";
return ($s_line);
}
this is based on formmail.php version 8.02 hope it helps someone.
and thanks again Russell for the truly awesome script.
Bookmarks