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

index f21b97c2b3b49e3b5539ee1672a7c89a74f01088..baa7a06c32b5f5fa7c5067d59d1da0757563a035 100644 (file)
@@ -764,6 +764,12 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         if (empty($this->parameters['skipNotification'])) {
             foreach ($this->getObjects() as $user) {
                 $email = new Email();
+                $email->setMessageID(\sprintf(
+                    'com.woltlab.wcf.adminActivation/%d/%d/%s',
+                    $user->userID,
+                    TIME_NOW,
+                    \bin2hex(\random_bytes(8))
+                ));
                 $email->addRecipient(new UserMailbox($user->getDecoratedObject()));
                 $email->setSubject($user->getLanguage()->getDynamicVariable('wcf.acp.user.activation.mail.subject'));
                 $email->setBody(new MimePartFacade([