forked from ag_kommunikation/webseite
feat: Now really send emails.
This commit is contained in:
parent
fa9cf1bf37
commit
f58ba3bbc1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user