feat: Now really send emails.

This commit is contained in:
muli 2022-08-03 19:32:59 +02:00
parent fa9cf1bf37
commit f58ba3bbc1
1 changed files with 11 additions and 2 deletions

View File

@ -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) {