From: Tim Düsterhus Date: Mon, 29 Jun 2020 12:03:48 +0000 (+0200) Subject: Add List-ID header to notification mails X-Git-Tag: 5.3.0_Alpha_1~168^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47f822cf611cbd2f68df462ba828a17f561235cb;p=GitHub%2FWoltLab%2FWCF.git Add List-ID header to notification mails see #3379 --- 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)) {