From 97556fa6d00e6f48b1ef4eaf36e60d904d3b255e Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 16 Jan 2015 22:19:19 +0100 Subject: [PATCH] contact: reply form to send email to info@covexcelsiorleiderdorp.nl Copied from Excelsior at commit 2018-v1-1-gf1550a9744 (2018-04-20). --- contact.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 contact.php diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..1f0bad5 --- /dev/null +++ b/contact.php @@ -0,0 +1,43 @@ + 'HTTP_ACCEPT_LANGUAGE', + 'User-Agent' => 'HTTP_USER_AGENT', + ) as $mailhdr => $serverhdr) { + if (!$_SERVER[$serverhdr]) continue; + $header .= "\r\n$mailhdr: ".$_SERVER[$serverhdr]; + } + + $origin = $_SERVER['REMOTE_ADDR']; + $origin .= sprintf(' (%s)', gethostbyaddr($origin)); + $body = "Ingevuld vanaf $origin:\r\n\r\n"; + + foreach ($_POST as $k => $v) { + $body .= "$k: $v\r\n"; + } + + $sent = mail($rcpt, $subject, $body, $header); + if (!$sent) + echo '

Helaas ging er iets mis bij het doorvoeren. Probeer het later nog eens.

'; + elseif ($source == 'bestelling') + echo '

Bedankt voor uw bestelling. U ontvangt z.s.m. de bevestiging van deze bestelling via uw opgegeven e-mailadres.

'; + else + echo '

Bedankt voor uw reactie!

'; +} + -- 2.30.0