ScriptInstallation.In

Home
Services
PHP Script Installation
CGI Script Installation
Linux Tips
FreeBSD Tips
Windows Tips
Server Tips
Scripts Directory
HOW-TO
Contact Us


HTML Mail in PHP

Sending HTML Mail in PHP is easy. With a few lines of extra code, you can make your text mail impressive Rich Text HTML mail.

<?php

$welcome_mail = <<<EOT
<HTML>
<HEAD>
</HEAD>
<BODY>
<FONT SIZE="4" COLOR="#006600"><B>TEST HTML 
MAIL</B></FONT>
</BODY>
</HTML>
EOT;

$headers = "From: youremail@yourdomain.com\n";
$headers .= "Bcc: yourbccemail@yourisp.com\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";

mail("Your Name <you@yourdomain.com>","Mail Subject
Here",$welcome_mail,$headers);

echo "Mail Send";

?>

Create a new file mail_test.php and put above content and upload the file to your web server and call the file. Now you will get email with Rich Text Message body.



Copyright © ScriptInstallation.in