diff --git a/lib/MailQueueHandler.php b/lib/MailQueueHandler.php index 3b44e63ae..80b7d08ef 100644 --- a/lib/MailQueueHandler.php +++ b/lib/MailQueueHandler.php @@ -35,6 +35,7 @@ use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; +use OCP\Mail\Headers\AutoSubmitted; use OCP\Mail\IMailer; use OCP\RichObjectStrings\InvalidObjectExeption; use OCP\RichObjectStrings\IValidator; @@ -375,6 +376,9 @@ protected function sendEmailToUser($userName, $email, $lang, $timezone, $maxTime $message->useTemplate($template); $message->setFrom([$this->getSenderData('email') => $this->getSenderData('name')]); + // We don't want auto generated responses to autogenerated activity notifications + $message->setAutoSubmitted(AutoSubmitted::VALUE_AUTO_GENERATED); + try { $this->mailer->send($message); } catch (\Exception $e) {