Hi,
I had some problems with sending mail with PHP a while ago, mine was with sending Japanese characters in the subject line but it sends plain text fine as well 😉
Paste this function after your <?php and before you define the $to variable:
function jisMail($mes, $sub, $to, $from, $rto, $plain){
//JIS Email function by Shadar
//www.shadar.co.uk
//Come by for more useful code snippets
//Set up header
$header = "MIME-Version: 1.0\r\n";
$header = $header . "From: ".$from."\r\n"; ;
$header = $header . "Reply-To: ".$rto." \r\n"; ;
if($plain){
$header = $header .
"Content-type: text/plain; charset=JIS\r\n";
}else{
$header = $header .
"Content-type: text/html; charset=JIS\r\n";
}
$header = $header . "Content-Transfer-Encoding:7bit\r\n";
//Set the internal language for the multi-byte functions
mb_language("ja");
$message = mb_convert_encoding($mes, "JIS", "AUTO");
$subject = mb_convert_encoding($sub, "JIS","AUTO");
$subject = mb_encode_mimeheader($subject);
mail($to, $subject, $message, $header);
}
Then change your mail function call to read:
jisMail($mes, $sub, $to, $email, $email, true);
and that should be it, I even tested it and it works with me.
Shadar.