<?php
$emailSubject = 'Contact Form Message';
$webMaster = 'email@email.com';
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];
header("Location: sent.html");
$body = <<<EOD
<br />
Name: $nameField <br />
Email: $emailField <br />
Comments: $commentsField <br />
<br />
EOD;
$headers = "From: $emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
?>