View file HTML/contact.php
<?php
if (isset($_POST["submit"])) {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$from = 'Parax Contact Form';
$to = 'example@gmail.com';
$subject = $_POST['subject'];
$body = "From: $name\n E-Mail: $email\n Subject: $subject\n Message:\n $message";
mail($to, $subject, $body, $from) or die("Error!");
header("location: thank-you.html");
}
?>