diff --git a/WEBROOT/Commands/TerminErinnerung.php b/WEBROOT/Commands/TerminErinnerung.php index 6d19374..4a13380 100644 --- a/WEBROOT/Commands/TerminErinnerung.php +++ b/WEBROOT/Commands/TerminErinnerung.php @@ -51,23 +51,24 @@ foreach ($termine as $termin) { $message .= "Uhrzeit: {$termin["ZEIT"]}\n"; if (!empty($termin["NOTIZ"])) { - $message .= "Notiz: {$termin["NOTIZ"]}\n"; + $notizClean = mb_convert_encoding($termin["NOTIZ"], "UTF-8", "auto"); + $message .= "Notiz: {$notizClean}\n"; } sendMail( $subject, $message, - "/cron/reminder.php", + $_SERVER['SCRIPT_NAME'] ?? 'CLI/Unbekannt', true, $benutzer["EMAIL"], ); - // Erinnerung als gesendet markieren DatabaseUpdate( "Termine", - "ERINNERUNG_AM = NOW()", + "ERINNERUNG_AM = ?", "ID = ?", + date('d-m-Y H:i:s'), $termin["ID"] ); } -} \ No newline at end of file +}