From 5b51413a7fcfa648515423f51c268b51fc14b8a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Thu, 12 Mar 2020 14:20:03 +0100 Subject: [PATCH] Do not use the instance name as user part of from mail addresses MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will cause issues since the theming name can contain characters that are not allowed in the local part of the mail address (like spaces) Signed-off-by: Julius Härtl --- lib/private/Mail/Mailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index d103e1380c5..8f442365585 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -164,7 +164,7 @@ class Mailer implements IMailer { $debugMode = $this->config->getSystemValue('mail_smtpdebug', false); if (empty($message->getFrom())) { - $message->setFrom([\OCP\Util::getDefaultEmailAddress($this->defaults->getName()) => $this->defaults->getName()]); + $message->setFrom([\OCP\Util::getDefaultEmailAddress('no-reply') => $this->defaults->getName()]); } $failedRecipients = []; -- 2.39.5