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

index 071f20ac32ec0ce2b0fd9a469ab57c2474f4d2ae..35bf72dd2ed0f440a6e7693e47e0fb0cf132037c 100644 (file)
@@ -125,6 +125,12 @@ class SendNewPasswordWorker extends AbstractWorker
     protected function sendLink(User $user)
     {
         $email = new Email();
+        $email->setMessageID(\sprintf(
+            'com.woltlab.wcf.sendNewPassword/%d/%d/%s',
+            $user->userID,
+            TIME_NOW,
+            \bin2hex(\random_bytes(8))
+        ));
         $email->addRecipient(new UserMailbox($user));
         $email->setSubject($user->getLanguage()->getDynamicVariable('wcf.acp.user.sendNewPassword.mail.subject'));
         $email->setBody(new MimePartFacade([