如何使用PHP发送HTML消息?

I'm trying to send the message as HTML, but it's arrived as XML Escape!!

Example in screenshot:

enter image description here

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

Add concat shorthand .= to this line:

 $headers = "From: Ali Najm <ali-najm@iraqnaa.me>" . "
";

You're reassigning $headers var.

Sending nice html with php