the following code isn't working. however when i take out the "From: $from" from the headers section an email is sent.
i know that $from is being passed to this page, coz it appears in the "Congratulations....etc" bit.
$to = $_POST["to"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$from = $_POST["from"];
$headers = "From: $from\n" . "Reply-to: $from\n" . "X-Mailer: PHP\n";
mail($to, $subject, $message, $headers);
echo ("<br><p align=center>Congratulations, an email has been sent with out problems to $to from $from.</P>");
this has been doing my head in for ages... and im going insane.
please help!