<? //Copy this into notepad and then save it to a file called send.php
//Configuration Set your email address here
$email_address = "me@umydomain.com"; //This should be changed to your email address.
$subject_prefix = "Website Contact - "; //This will be the subject prefix of all emails. default "Website Contact - User Subject
// --- Do not modify below ---
//Collects varibles from previous page, the Contact form
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $subject_prefix . $_POST['subject'];
$message = $_POST['message'];
//This part is intended to prevent malicious acts such as being used by spammers
//Most servers are setup in such a way that this section is not needed but its a good security precaution to have.
$from = urldecode($email);
if (eregi("\r",$from) || eregi("\n",$from)){
print "Malformed Headers were detected.";
exit;
}
// The Content of the email includes all the fields listed
$message = "Name: $name \nEmail: $email \nSubject: $subject \nMessage: $message ";
//This part sends the email to you.
mail($email_address, $subject, $message, "From: $email");
//Redirects to sent.htm
//What follows is the WEB page thanking them for sending the contact info
// Change this to suite your requirements
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Web Contact completed</title>
</head>
<body>
<p>Thanks for your message <? print $name; ?></p>
<p>Best Regards</p>
<p>
<a href="http://www.harrycroll.com">Continue looking at Harrycroll.com</a>
</p>
</body>
</html>