Php mail testing not working?

what could be wrong with the following code? i get the following error: Warning: mail() [function.mail]: SMTP server response: 501 Syntax Error: Unbalanced angle brackets in C:\wamp\www\test\test.php on line 14 Cannot Send Email <?php // ---------------- SEND MAIL FORM... show more what could be wrong with the following code? i get the
following error:
Warning: mail() [function.mail]: SMTP server response: 501 Syntax Error: Unbalanced angle brackets in C:\wamp\www\test\test.php on line 14
Cannot Send Email

<?php
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to="me@localhost";
// Your subject
$subject="Test";
// From
$header="from: me <me@localhost>";
// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";
// send email
$sentmail = mail($to,$subject,$message,$header);
// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}
else {
echo "Cannot Send Email ";
}

?>
3 answers 3