Coding
How To Send HTML Format Email in PHP
Welcome to zaiygam.com, I will cover in this article which will show you how to send HTML format email using PHP, normally PHP send plain text email it’s can’t send any formatting or graphics by default so, send the email with HTML it’s the best way to send formatting email so let’s start this article.
//Send HTML Email Using PHP
$to="username@example.com";
//subject of the mail
$subject = "Test Email";
//message of the mail which contains some html
$message =”
Name | |
---|---|
Test1 | test1@google.com |
Test2 | test2@yahoo.com |
Test3 | test3@gmail.com |
“;
$headers .= “From:noreply@zaiygam.com”;
$headers .= “Content-type: text/html; charset=iso-8859-1rn”;
mail($to, $subject, $message, $headers);
echo $message;
?>
I hope you like my post and don’t forget to share with your colleagues on facebook or twitter or GitHub!!!!