I just testing this script and it works fine but i need to add the following to get mail client to recognise the html:
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html charset=iso-8859-1\r\n";
$headers.= "From: $from\r\n";
Q. how to add these as the format of exisiting headers e.g. $headers["From"] = "bandy"; is different ? Thanks in adv
<?
include("Mail.php");
$recipients = "gcox@blank.com";
$headers["From"] = "bandy";
$headers["To"] = "greg";
$headers["Subject"] = "Pub Reference";
$body = "Greg, here is another pub reference\n Name: $REQUEST[nameBox]\nNotes ID: $REQUEST[lotusIdBox]\nResidence: $REQUEST[cityTownBox]\n Pub name: $REQUEST[pubBox]\nPub Location: $REQUEST[pubLoc]\nReview: $REQUEST[descBox]\nRating: $_REQUEST[rating]";
$params["host"] = "localhost";
$params["port"] = "25";
$mail_object =& Mail::factory("smtp", $params);
if ($mail_object->send($recipients, $headers, $body))
{
echo("<p>Message sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>