Alternative Part

For receivers that do not support HTML mails, you can send a multi-part mail with an alternative part. Notice the two dashes that precede each boundary and that mark the end of the entire message. Leave an empty line before and after the sub-messages.
RESETRUNFULL
<!DOCTYPE html><html><head></head>
<body><?php

// This creates a random hash for the boundary string
$boundary=md5(time());

$msg="
If you can see this then your client doesn't accept MIME types!

--$boundary
Content-Type: text/plain; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit

This is the simple, alternative mail.

--$boundary
Content-Type: text/html; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit

<h1>This is the HTML mail.</h1>

--$boundary--";

mail("example@yahoo.com",
   "Test 3",
   $msg,
   "From: admin@example.com\n".
   "Content-type: multipart/alternative; boundary=\"$boundary\"");

?> </body></html>