[font=trebuchet ms]I don't believe you've set it up correctly. Create a new file, say mail.php, with the following code. (Note: this file does not require a .php extension, as it does not use PHP.)[/font]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Send email form</title>
<style type="text/css">
label { display: block; text-align: right; }
fieldset {border-style: solid;}
legend {font-size: large;}
</style>
</head>
<body>
<h1>Send email</h1>
<form action="sendmail.php" method="post">
<fieldset>
<legend>Send an email</legend>
<label><input type="text" name="email" value="Email"></label>
<label><input type="text" name="subj" value="Subject"></label>
<label><textarea rows="10" cols="30" name="message">Message</textarea></label>
<label><input type="submit"></label>
</fieldset>
</form>
</body>
</html>
[font=trebuchet ms]Then, create another file, named sendmail.php. It should have the following code. (This file does require a .php or other PHP-parsed extension.)[/font]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Send email</title>
</head>
<body>
<?php
$email = (isset($_POST["email"])?trim($_POST["email"]):"");
$subj = (isset($_POST["subj"])?trim($_POST["subj"]):"");
$msg = (isset($_POST["message"])?trim($_POST["message"]):"");
if(empty($email)||empty($subj)||empty($msg)){
echo "<h1>Error</h1>\n<p>You did not fill in all fields.</p>\n";
exit;
} else {
mail("admin@koldfusion.co.uk", $subj, $msg, "From: $email");
header("Location: http://www.koldfusion.co.uk/sent.htm");
exit;
}
?>
</body>
</html>