How to send html email with php Windows XP

Asked By 20 points N/A Posted on -
qa-featured

I tried html emails before and the I want them to look nicer especially to my important clients.  I want to how to send html email with PHP, kindly include all the possible ways or applications needed by this. my OS is windows XP.

SHARE
Answered By 5 points N/A #149949

How to send html email with php Windows XP

qa-featured

You can send HTML mail with the use of PHP you can do this is calling mail function with an extra header below is the following example code.

<?php

$fromAddr = '[email protected]'; // the address to show in From field.

$recipientAddr = '[email protected]';

$subjectStr = 'Thank You';

$mailBodyText = <<<HHHHHHHHHHHHHH

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

<title>Thank You</title>

</head>

<body>

<p>

<b>Your login is:</b> {$_POST['login']}<br>

<b>Password:</b> {$_POST['password']}<br>

</p>

</body>

</html>

HHHHHHHHHHHHHH;

$headers= <<<TTTTTTTTTTTT

From: $fromAddr

MIME-Version: 1.0

Content-Type: text/html;

TTTTTTTTTTTT;

mail( $recipientAddr , $subjectStr , $mailBodyText, $headers);

?>

 Note <<<HHHHHHHHHHHHHH is called hero codec

Related Questions