From c12afcc909b1df072f7f38a2e13ea77c344e2af8 Mon Sep 17 00:00:00 2001 From: Anxhelo Lushka Date: Mon, 12 Mar 2018 21:09:24 +0100 Subject: [PATCH] Update form.php --- form.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/form.php b/form.php index 83983f1..b42728f 100644 --- a/form.php +++ b/form.php @@ -25,15 +25,6 @@ if (array_key_exists('to', $_POST)) { $name = ''; } - //Validate to address - //Never allow arbitrary input for the 'to' address as it will turn your form into a spam gateway! - //Substitute appropriate addresses from your own domain, or simply use a single, fixed address - if (array_key_exists('to', $_POST) and in_array($_POST['to'], ['anxhelo1995'])) { - $to = $_POST['to'] . '@gmail.com'; - } else { - $to = 'anxhelo1995@gmail.com'; - } - //Make sure the address they provided is valid before trying to use it if (array_key_exists('email', $_POST) and PHPMailer::validateAddress($_POST['email'])) { $email = $_POST['email'];