Set explicit Message-ID in ExceptionMailerCronjob
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 15 Feb 2021 11:25:01 +0000 (12:25 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 18 Feb 2021 15:25:20 +0000 (16:25 +0100)
wcfsetup/install/files/lib/system/cronjob/ExceptionMailerCronjob.class.php

index 2886a8b15dd5e9e4ba1b8bba34828a43cb1583bd..eb1d9591d845ae6267a1943e51edac972bc83c11 100644 (file)
@@ -89,6 +89,11 @@ class ExceptionMailerCronjob extends AbstractCronjob
         $language = LanguageFactory::getInstance()->getDefaultLanguage();
 
         $email = new Email();
+        $email->setMessageID(\sprintf(
+            'com.woltlab.wcf.exceptionMailer/%d/%s',
+            $timestamp,
+            \bin2hex(\random_bytes(8))
+        ));
         $email->addRecipient(new Mailbox(MAIL_ADMIN_ADDRESS, null, $language));
         $email->setSubject($language->getDynamicVariable('wcf.acp.exceptionLog.email.subject', [
             'date' => $timestamp,