HTML Code
send_form_email.php
$to = "info@yourdomain.com";
$from = "";
$subject = "";
$message = "";
if (isset($_POST["senderEmail"])) {
$from = $_POST["senderEmail"]; // sender
$name = $_POST["senderName"];
$subject = $_POST["subject"];
$message.="Name: ";
$message.=$_POST['senderName'] . "
";
$message.="Message: ";
$message .= $_POST['message'];
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
mail($to, $subject, $message, $headers);
}
header('Location: http://www.yourdomain.com');
?>