iDimensionz
iDimensionz


Welcome, Guest!     Login
Don’t have an account?  Create one NOW!

Creating HTML formatted e-mail in PHP

Here is some example code for sending HTML formatted e-mail via the PHP mail function:

$from="YourFromAddress@yourdomain.com";
$to="SendThisTo@TheirDomain.com";
$body="<html><body>Add your HTML code here</body></html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $from <$from>\r\n";
$headers .= "Reply-To: $from <$from>\r\n";
$headers .= "X-Mailer: PHP\r\n";
mail($to,"Put your e-mail subject here!", $body, $headers);

Leave a Reply

You must be logged in to post a comment.


;