diff --git a/WEBROOT/Commands/TerminErinnerung.php b/WEBROOT/Commands/TerminErinnerung.php index 4a13380..c5c0cd0 100644 --- a/WEBROOT/Commands/TerminErinnerung.php +++ b/WEBROOT/Commands/TerminErinnerung.php @@ -63,6 +63,8 @@ foreach ($termine as $termin) { $benutzer["EMAIL"], ); + print_r("{$benutzer["EMAIL"]}\n{$message}"); + DatabaseUpdate( "Termine", "ERINNERUNG_AM = ?", diff --git a/WEBROOT/modules/Mail.php b/WEBROOT/modules/Mail.php index 54e2bb6..19f285e 100644 --- a/WEBROOT/modules/Mail.php +++ b/WEBROOT/modules/Mail.php @@ -3,7 +3,8 @@ include_once __DIR__ . '/../controller/DatabaseController.php'; include_once __DIR__ . '/../controller/DataController.php'; -function sendMail($subject, $message, $url, bool $log, $to = "bruno.eckhardt07 qmail.com") { +function sendMail($subject, $message, $url, bool $log, $to = "bruno.eckhardt07 qmail.com") +{ $headers = "From: bruno.eckhardt07@gmail.com\r\n"; mail( $to, @@ -14,17 +15,19 @@ function sendMail($subject, $message, $url, bool $log, $to = "bruno.eckhardt07 q if ($log == true) { DatabaseInsert( "Mailing", - "DATUM, SUBJECT, MESSAGE, URL, CLIENT_IP", + "DATUM, SUBJECT, MESSAGE, MAIL_AN, URL, CLIENT_IP", (new getSpecificData())->getRequestTime(), $subject, $message, + $to, $url, (new getSpecificData())->getClientIP(), ); } } -function errorMail($title, $error, bool $log) { +function errorMail($title, $error, bool $log) +{ $headers = "From: bruno.eckhardt07@gmail.com\r\n"; mail( "bruno.eckhardt07@gmail.com", @@ -42,4 +45,4 @@ function errorMail($title, $error, bool $log) { (new getSpecificData())->getClientIP(), ); } -} \ No newline at end of file +}