\n"; $headers .= "Reply-To: $from_name <$from_email>\n"; $send_mail = mail($to, $subject, $message, $headers); if ($send_mail) { return true; } else { return false; } } // check that the form is truly sent if ($send == 1) { // get data from the form $send=$_POST['send']; $from_name=$_POST['from_name']; $from_email=$_POST['from_email']; $message=$_POST['message']; // send e-mail $try_mail = send_mail($from_name, $from_email, $message); // output the result if ($try_mail) { echo "Your e-mail message was sent!"; } else echo "Your e-mail message was not sent!"; } } ?>
From: Your email: your message: