I'm trying to send the message as HTML, but it's arrived as XML Escape!!
Example in screenshot:
second problem is, if i typing the subject in "Arabic language" it's encoded in ANSI.
but if i test to send the same message via Gmail the subject be fine, but the content arrived as XML Escape!!
PHP CODE:
<?php
if(isset($_POST['submit'])){
$to = "email@gmail.com";
$from = $_POST['email'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$subject = $first_name . " " . $last_name . " " . "
";
$message = '<html><body>';
$message .= '<h1>Hello, World!</h1>';
$message .= '</body></html>';
$headers = "MIME-Version: 1.0" . "
";
$headers .= "Content-type: text/html; charset=UTF-8" . "
";
$headers = "From: Brand Name <info@my-dmoain.me>" . "
";
mail($to,$subject,$message,$headers,"-f info@my-dmoain.me");
echo "Thanks";
}
?>
I cant figure out what is wrong.
Thanks