Hi,

I Want to Send HTML mail with Image and logo. pls some one help me how i can do it.

Thanks

-keval

if you are using this for a contact form you should use smtp to send rather than sendmail.
however here is some simple code that works for me regardless.
This assumes you have a contact form with name email and comments fields
You may want to use php injection prevention to stop people sending emails how they shouldn't be sent

form.php
<?php
if (isset($_POST['email'])){
/* Email Variables */

$emailSubject = 'onlinecustomer!';
$webMaster = 'your email';


/* Data Variables */

$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];



$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>

Comments: $comments <br>
<font size="6">BIG FONT</font>
html formatting will work fine in most cases
EOD;


$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
}
?>

hope this helps :)

personnally i feel it helps for people to post code rather than a link :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.