<?php
$name = $_POST['name'];
$visitor_email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];

$email_from = 'lecraftslv@gmail.com';

$email_subject = 'Pienākusi ziņa';

$email_body = "User Name: $name.\n".
                "User email: $visitor_email.\n".
                    "Subject: $subject.\n".
                    "User message: $message.\n";

$to = 'lecraftslv@gmail.com';

$headers = "From: $email_from \r\n";

$headers = "Reply-To: $visitor_email \r\n";

mail($to,$email_subject,$email_body,$headers);

header("Location: parmums.html");

?>

