Mailer (HTML Support)

This program can be used to send automated e-mails.
I use this program to send e-mails during the registration process on websites.
It supports HTML as well means you can add HTML Tags to the mail body:

$msg = <<<EOPAGE
Hello,<br /><br />
<strong>My Name :</strong> Only For testing<br />
<strong>Email :</strong> example@gmail.com<br />
<strong>Message :</strong> hello this is for testing only

http://www.php.net/manual/en/index.php
<br />
Thanks
EOPAGE;

$to = 'example@gmail.com';
$from = 'admin@example.com';
$subject = "Subject goes here…..";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Name <admin@example.com>' . "\r\n";
$headers .= 'Reply-To:admin@example.com' . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";
mail($to, $subject, $msg, $headers);

you can use more headers to the e-mail for reference



Comments

Popular posts from this blog