bluboy
2007-06-10 21:46:56 UTC
when the user clicks submit it runs the following php code:
sendEmail($_POST);
function sendEmail($post){
$emailto .= "email@somewhere.com";
$subject .= "Question from " . $post['uname'];
$header .= $post['$uname'];
$message .= $post['umail']." wrote the following:\n\n";
$message .= $post['umessage']."\n\n";
mail($emailto, $subject, $message, $header);
header("LOCATION: contact_sent.php#sent");
}
?>
Problem: when I check the sent message i see the date, the subject, but the sender appears as follows:
nobody@server#.domain.com
Question: How can I do so that the field with the email appears as the sender, or that the field with the name appears as the sender (or maybe both) Thanks