diff --git a/cron/calendar_reminders.php b/cron/calendar_reminders.php index 913eda1c..3cf1b261 100644 --- a/cron/calendar_reminders.php +++ b/cron/calendar_reminders.php @@ -121,7 +121,7 @@ $sql = "SELECT `ticket`.`id` AS `id`, `ticket`.`trackid` AS `trackid`, `ticket`. `ticket`.`custom17` AS `custom17`, `ticket`.`custom18` AS `custom19`, `ticket`.`custom19` AS `custom19`, `ticket`.`custom20` AS `custom20`, `ticket`.`html` AS `html` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` AS `ticket` - INNER JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS `user` + LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS `user` ON `ticket`.`owner` = `user`.`id` WHERE `due_date` IS NOT NULL AND `due_date` <= NOW() diff --git a/inc/email_functions.inc.php b/inc/email_functions.inc.php index 8e512e84..384d9bdd 100644 --- a/inc/email_functions.inc.php +++ b/inc/email_functions.inc.php @@ -339,7 +339,9 @@ function mfh_sendOverdueTicketReminder($ticket, $users, $modsForHesk_settings) { $htmlMessage = hesk_processMessage($htmlMessage, $ticket, 1, 1, 0, $modsForHesk_settings, 1); $emails = []; - $emails[] = $ticket['user_email']; + if ($ticket['user_email'] != NULL) { + $emails[] = $ticket['user_email']; + } foreach ($users as $user) { if ($user['email'] != $ticket['user_email'] && ($user['isadmin'] || strpos($user['categories'], $ticket['category']) !== false)) {