You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
798 B
PHTML

5 years ago
<?php
ini_set("sendmail_path", "/usr/sbin/ssmtp -t");
ob_start();
session_start();
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
if (!(isset($name) && isset($email) && isset($message)) || filter_var($email, FILTER_VALIDATE_EMAIL) != TRUE) {
header('Location: /?contact=2#contact');
die();
}
mail('admin@netsyms.com', 'Netsyms Box Contact Form Message', "Name: $name\n\nEmail: $email\n\nMessage:\n".$message, "From: $email\r\nReply-To: $email");
mail($email, 'Netsyms Box Contact Form', "Your message has been sent. You should receive a reply soon if needed.", "From: admin@netsyms.com\r\nReply-To: admin@netsyms.com");
header('Location: /?contact=1#contact');
file_put_contents("contact.log", date() . " | $email\n$message\n\n\n", FILE_APPEND);