Following are the codes for HTML form:
" <FORM action="5-sendmail.php" method="POST">
<p><strong>Name:</strong><br> <INPUT type="text" size="25" name="name"></p>
<p><strong>E-Mail Address:</strong><br> <INPUT type="text" size="25" name="email"></p>
<p><strong>Message:</strong><br>
<textarea name="message" cols=30 rows=5></textarea></p>
<p><INPUT type="submit" value="send"></p>
</FORM> "
These are codes for php processing file
"
<?php
echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>";
echo "<p>Your e-mail address is: <b>$_POST</b>.</p>";
echo "<p>Your message was:<br>";
echo "$_POST[message] </p>";
//start building the mail string
$msg = "Name: $_POST[name]\r\n";
$msg .= "E-Mail: $_POST\r\n";
$msg .= "Message: $_POST[message]\r\n";
//set up the mail
$recipient = "manbhatti@hotmail.com";
$subject = "Form Submission Results";
$mailheaders = "From: My Web Site <defaultaddress@yourdomain.com> \r\n";
$mailheaders .= "Reply-To: $_POST";
//send the mail
mail($recipient, $subject, $msg, $mailheaders);
?>
"
Look forward to receive your reply!
thanks