mail() function not working!

April 27, 2011 at 16:33:41
Specs: Windows xp sp2, CPU=466MHz ram=384MB
I have WAMP server 2.0.I want to email my email server running hmail server.
Here is the error:
Warning: mail() [function.mail]: SMTP server response: 550 A valid address is required. in C:\wamp\www\form\file.php on line 14

Here is the code:
$hcomments = $_POST["comments"];
$hname = $_POST["name"];
$hemail = $_POST["email"];
$hoption = $_POST["score"];
$content = "Score:" . $hoption . "Comments:" . $hcomments . "Name:" . $hname;
$to = "laptopdude90";
$subject = "Your site was rated!";
$headers = "From: " . $hname . "<" . $hemail . ">\nReply-To: " . $hemail;

mail( $to, $subject, $content, $headers);

<form action="file.php" method="POST">
Name: <input type="text" name="name" size="30" /><br />
email(optional):<input type="text" name="email" /><br />
Additional Comments:
<TEXTAREA ROWS="10" COLS="10" name="comments"></TEXTAREA>

Please rate my site from 1 to 10 (1 = bad and 10 = good): <br />
<select name="score"><br />
<option selected>10</option>
<input type="submit" value="submit" />
</select><br />

See More: mail() function not working!

Report •

April 27, 2011 at 21:48:59
Your email address is incomplete. You need to add or whatever the email's domain is.

You may also want to add some spaces to the content variable. As is, it will look like this:

Apologies if I don't respond to your reply immediately. I don't check this site daily, but you're welcome to PM me as a reminder.

Report •

April 28, 2011 at 11:20:20
Nope.Same error.

Report •

Related Solutions

Ask Question