#125_fehler_im_kontaktformular #126
@ -33,7 +33,7 @@ function prepare_message_body(string $message, 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($subject, $message, $name, $email) {
|
||||
function send_message_to_office(string $subject, string $message, string $name, string $email) {
|
||||
return mail(
|
||||
getenv('WTF_CONTACT_TO'),
|
||||
"=?UTF-8?B?" . base64_encode($subject) . "?=",
|
||||
@ -48,7 +48,7 @@ function send_message_to_office($subject, $message, $name, $email) {
|
||||
);
|
||||
}
|
||||
|
||||
function send_response($response_data) {
|
||||
function send_response(array $response_data) {
|
||||
$json = json_encode($response_data);
|
||||
if ($json === false) {
|
||||
// Avoid echo of empty string (which is invalid JSON), and
|
||||
|
Loading…
Reference in New Issue
Block a user