Send HTML View from PHP Mail function

<code>
  
$to      = "testuser@domain.com"
$from    = "testuser1@domaiin.com";
$subject = "This Test for HTML View in Mail";
$message = "<html>
<head></head>
<body>
<h1>Hello World!..</h1>
</body>
</html>";

$strHeader   = "";
$strHeader  .= "From:".$from ."\n";
$strHeader  .= 'MIME-Version: 1.0' . "\r\n";
$strHeader  .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n\n";

$flgSend = @mail($to,$subject,$message,$strHeader);
if ( $flgSend ){
echo "Mail Send Successfully.";
}else{
echo "Mail cann't Send.";
}

</code>

Tags: 
X