Can anybody tell me why my sendmail fform is not working?
here is source:
My HTML source:
<html>
<head>
<title>
E-mail </title>
</head>
<body>
<form action="sendform.php" method="POST">
Your Name: <INPUT type="text" name="name"><br><br>
Your E-Mail Adress: <INPUT type="text" name="email"><br><br>
Message:<br>
<textarea name="message" cols=30 rows=5> </textarea> <br><br>
<INPUT type="submit" value="Send Form">
</form>
</body>
</html>
This is my PHP form:
<html>
<head>
<title>Send Form </title>
</head>
<body>
<?php
print "Thank you, <b>$_POST[name]</b>, for your message!<br><br>\n\n";
print "Your E-mail Adress is: <b>$_POST[email]</b><br><br>\n\n";
print "Your Message was:<br><br>\n\n";
print "$_POST[message] <br><br>";
//start building the mail string
$msg = "Name: $_POST[name]\n";
$msg .= "E-mail: $_POST[email]\n";
$msg .= "Message: $_POST[message]\n";
//set up the mail
$recipient="
habibtoshmatov@yahoo.com";
$subject="Form Submission Results";
$mailheaders="Form: My Web Sites <
defaultaddress@yourdomain.com> \n";
$mailheaders .="Reply-to: $_POST[email]";
//send the mail
mail($recipient, $subject, $msg, $mailheaders);
?>
</body>
</html>
_____________________________________________________________________
Thank you guys, I don`t know I would do without you
by the this erorr message I get every time:
>
Notice: Undefined index: name in C:\*******\sendform.php on line 7
Thank you, , for your message!
Notice: Undefined index: email in C:\*******\sendform.php on line 8
Your E-mail Adress is:
Your Message was:
Notice: Undefined index: message in C:\*******\sendform.php on line 10
Notice: Undefined index: name in C:\*******\sendform.php on line 12
Notice: Undefined index: email in C:\******\sendform.php on line 13
Notice: Undefined index: message in C:\******/sendform.php on line 14
Notice: Undefined index: email in C:\******\sendform.php on line 19
Warning: mail(): SMTP server response: 451 See
http://pobox.com/~djb/docs/smtplf.html. in C:\******\sendform.php on line 21
P.S My PHP is working fine.