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 Email
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!!!!

Wanna Checkout :

Subscribe To Our Newsletter

Sign up to our newsletter for free tips, gifts and exclusive discounts.

*We care about our users privacy and their data

Zaiygam

Hey, I am a content publisher and this is my site, where i share knowledge and experience which I gain in my day to day life. Thanks for visiting my site.

Leave a Reply

Your email address will not be published. Required fields are marked *

Adblock Extension or Add on Detected

Please consider supporting us by disabling your ad blocker