X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/177953fe451a3e393cf9d63bc977de11544bd395..fc74e45e15e3b1f17312f229496c25f7caff7d60:/contact.php diff --git a/contact.php b/contact.php index 9d0b1bc..7ffa409 100644 --- a/contact.php +++ b/contact.php @@ -14,7 +14,8 @@ if ($_POST) { function mailform($input = []) { $source = empty($input['subject']) ? 'reactie' : $input['subject']; - $rcpt = 'info@'.$_SERVER['HTTP_HOST']; + $domain = preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']); + $rcpt = "info@$domain"; $subject = "Formulier {$_SERVER['HTTP_HOST']}: $source"; if (!$input) { @@ -46,7 +47,7 @@ switch ($source) { } $reply = preg_match('/\A\w+@\w+\.[a-z]+\z/', @$input['email']) - ? $input['email'] : 'noreply@'.$_SERVER['HTTP_HOST']; + ? $input['email'] : "noreply@$domain"; $header = "From: $reply"; foreach (array(