diff --git a/assets/php/contact_form.php b/assets/php/contact_form.php index 88d24975..cdc4ce6f 100644 --- a/assets/php/contact_form.php +++ b/assets/php/contact_form.php @@ -16,8 +16,17 @@ function sanitize_text(string $name) { * mail(): Braucht auf dem Server einen korrekt konfigurierten Mailserver * phpmailer: Bibliothek, der per Composer installiert wird. Tut ganz gut mit SMTP. */ -function send_message_to_office($message, $name, $email) { - return true; +function send_message_to_office($subject, $message, $name, $email) { + return mail( + getenv('WTF_CONTACT_TO'), + 'spielwiese contact form', + $name . "\r\n" . $message, + $additional_headers = array( + "From" => getenv('WTF_CONTACT_FROM'), + "Reply-To" => $email, + "Return-Path" => getenv('WTF_RETURN_PATH'), + ), + ); } function send_response($response_data) {