Not sure if this is your problem but try adding something like:
$headers = "From: Bill Gates <bill.gates@microsoft.com> \n";
$headers .= "Reply-To: bill.gates@microsoft.com \n";
mail($address,$subject,$message,$headers);
Also try a different email address and add a slash n after every variable. If this doesn't work then test your SMTP server with a different method somehow.
Neil
Peter Robinson wrote:
I've searched all over, and I can't figure out why this code doesn't work:
$address="P.A.Robinson@eng.hull.ac.uk";
$subject="A test message";
$message="Here it is";
mail($address,$subject,$message);
All that happens is that I get a message saying "Warning: Unknown error in student_record.php on line 32", while no mail gets sent.
I have configured PHP.INI with the correct SMTP server address and mailfrom, and I'm at my wits' end (doesn't take long).
I'm using Windows NT, but everything else works fine, so I'd appreciate any ideas.
peter