From 47f822cf611cbd2f68df462ba828a17f561235cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 29 Jun 2020 14:03:48 +0200 Subject: [PATCH] Add List-ID header to notification mails see #3379 --- .../lib/system/cronjob/DailyMailNotificationCronjob.class.php | 1 + .../system/user/notification/UserNotificationHandler.class.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php index 0013290037..aac7ac0c02 100644 --- a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php @@ -212,6 +212,7 @@ class DailyMailNotificationCronjob extends AbstractCronjob { $email = new Email(); $email->setSubject($user->getLanguage()->getDynamicVariable('wcf.user.notification.mail.daily.subject', ['count' => count($notifications)])); $email->addRecipient(new UserMailbox($user)); + $email->setListID('daily.notification'); $html = new RecipientAwareTextMimePart('text/html', 'email_dailyNotification', 'wcf', ['notifications' => $notifications]); $plainText = new RecipientAwareTextMimePart('text/plain', 'email_dailyNotification', 'wcf', ['notifications' => $notifications]); diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index 7895753bfa..f554090071 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -695,6 +695,8 @@ class UserNotificationHandler extends SingletonFactory { 'title' => $event->getEmailTitle() ])); $email->addRecipient(new UserMailbox($user)); + $humanReadableListId = $user->getLanguage()->getDynamicVariable('wcf.user.notification.'.$event->objectType.'.'.$event->eventName); + $email->setListID($event->eventName.'.'.$event->objectType.'.instant.notification', $humanReadableListId); $message = $event->getEmailMessage('instant'); if (is_array($message)) { -- 2.20.1