Send an HTML Email Using PHP

Friday, April 25th, 2014 Programming

PHP Mail Function:

The mail() function allows you to send emails directly from a script.

Syntax For E-mail:


$to = ",";
$subject = "HTML email ";
$message = "<table><tr><td>Congrats</tr></td></table>";
// Always set content-type when sending HTML email//Very Very Important headers</h4>
$headers = "MIME-Version: 1.0" . "\r\n";</h4>
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";// More headers</h4>
$headers .= ‘From: &lt;;’ . "\r\n";
$headers .= ‘Cc:’ . "\r\n";

No comments yet.

Leave a comment

Request a Free SEO Quote