Hello,
I have a function for sending mail from PHP and I want to be albe to send Czech letters, like ř,ě,š,č,ř,ž,ý,á,é ..
The function goes like this:
function sendMail($to, $from, $subject, $body) {
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$body = iconv("UTF-8", 'ISO-8859-2', $body);
$content = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-2' /></head><body>";
$content .= $body;
$content .= "</body></html>";
$success = mail($to, $subject, $content, $headers);
if($success)
return TRUE;
else
return FALSE;
} // end: function
And the encoding works for all mail clients I have tryed, except google's gmail.
Any idea, how I could improve it, so the gmail also works?
Thanks, Mike.
EDIT: After a while, I realised that it is only 2 characters, that it represents wrong and that is Ř and ž. All other are alright.