please help me out.....
i am a newbie to php and i have to use php for my major project in school. i am currently using php 5.0.4, iis 5.1, mysql
i had incooperated a helpdesk.php for my contact page and the codes goes like this:
<?PHP
if(($_GET['sender_name'] == "") ||
($_GET['sender_email'] == "") ||
($_GET['message'] == ""))
{
header("Location:contact.htm");
exit;
}
$to="
[email protected]";
$subject="PBL Help Desk";
$msg="E-MAIL SENT FROM PBL Site\n";
$msg.="Sender's Name:\t$_GET[sender_name]\n";
$msg.="Sender's E-Mail:\t$_GET[sender_email]\n";
$msg.="Message:\t$_GET[message]\n";
$mailheaders="From: My Site <
[email protected]>\n";
$mailheaders.="Reply-To: $_GET[sender_email]\n";
$mailheaders.="Message: $_GET[message]\n";
mail($to,$subject,$msg,$mailheaders); // line 19
?>
<html><head>
<title>Temasek Polytechnic Online PBL Survival Kit</title>
</head><body>
<H1>The following email has been sent:</H1>
<p><strong>Your Name:</strong><br>
<? echo "$_GET[sender_name]"; ?>
<p><strong>Your Email Address:</strong><br>
<? echo "$_GET[sender_email]"; ?>
<p><strong>Message:</strong><br>
<? echo "$_GET[message]"; ?>
</body></html>
and my html code looks like these:
<html><head>
<title>Help Desk</title>
</head><body>
<form action="helpdesk.php" method="GET" name="HelpDesk" id="HelpDesk">
<p><strong>Your Name:</strong>
<input type="text" name="sender_name" size=30>
</p>
<p> </p>
<p><strong>Your Email Address:</strong>
<input type="text" name="sender_email" size=30>
<br>
</p>
<p> </p>
<p><strong>Message:</strong><br>
<textarea name="message" cols=60 rows=10 wrap=virtual><Enter your text here></textarea></p>
<p align="center"><input type="submit" name="submit" value="Send this form">
</form></body></html>
there is no error with the syntes but i have got this error saying:
"Warning: mail() [function mail]: SMTP server response: 5015.5.4 Invalid Address in c:/Inetpub/wwwroot/PBL/HelpDesk.php on line 19"
what could be the possible problem(s) that caused this error? i really need to complete this project.
anyone can help out???
desperate sunsetbay