by Xerpher » Wed Mar 19, 2003 7:46 pm
Your getting these because you have E_ALL enabled in your php.ini file which shows every single error, and although not fatal, that code has errors...
$headers .= "From: ".$_POST['name']."<".$_POST['email'].">\n";
$headers .= "X-Sender: <".$_POST['email'].">\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "Return-Path: <".$_POST['email'].">\n";
In this first section, romove the first .= like so...
$headers = "From: ".$_POST['name']."<".$_POST['email'].">\n";
$headers .= "X-Sender: <".$_POST['email'].">\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "Return-Path: <".$_POST['email'].">\n";
This is because .= tell php to add to $headers but $headers doesn't exist yet.
mail("me@myhost.com", "New Website Contact", $_POST['message'], $headers);
The error you showed basically means you didn't use the code right (he said you need to make an html form to use this) and that the form variable 'message' was never defined.