i'm using a simple php mail code, to make a contact form. here is the code :
<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "info@cactuspics.com";
$subject = $_POST['subject'];
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("ERROR");
echo "EMAIL SENT";
?>
but the problem is that when i get the email in my mailbox, its encoded in ANSI. something like this :
با سلام به گالري
is there a way to force php to send these information in UTF-8 formatting? because my visitors use arabic characters in contact form.
i tried to use this, but still didn't work :
'=?utf-8?B?'.base64_encode($formcontent).'?='
also i have to note, that i declared charset=utf8 in the meta tag of my HTML page.
any help is appreciated.