- Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on May 12, 2005 10:55:06 PM -->
<html>
<head>
<title>
mail
</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<form action="mail2.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br><br>
Comments<br>
<textarea name="comments"></textarea><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
the mail2.php that it is conected to goes like this:
- Code: Select all
<?
$name=$_POST['name'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="legoboy@cogeco.ca";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
when i try to use the mail.html to email me (after filling it out in it's entirty) it says:
Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:\apachefriends\xampp\htdocs\mail2.php on line 7
followed closely by my custom error message.
There was a problem sending the mail. Please check that you filled in the form correctly.
Can someone tell me what this means and how to fix it.
thank you,
John Berube