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

17 lines
798 B

ini_set("sendmail_path", "/usr/sbin/ssmtp -t");
$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');
mail('', '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:\r\nReply-To:");
header('Location: /?contact=1#contact');
file_put_contents("contact.log", date() . " | $email\n$message\n\n\n", FILE_APPEND);