]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add instance name to default sender 4380/head
authorLukas Reschke <lukas@statuscode.ch>
Tue, 18 Apr 2017 19:44:37 +0000 (21:44 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 18 Apr 2017 19:44:37 +0000 (21:44 +0200)
Otherwise your mail program shows "foo@mail.com" instead of "Nextcloud" or whatever your instance name is.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
lib/private/Mail/Mailer.php

index 852806b2e43c1f501afbc59ef14db9328da0d31f..80988d85701d7b6c8a13b58e6c767fd4a2ecda32 100644 (file)
@@ -111,7 +111,7 @@ class Mailer implements IMailer {
                $debugMode = $this->config->getSystemValue('mail_smtpdebug', false);
 
                if (sizeof($message->getFrom()) === 0) {
-                       $message->setFrom([\OCP\Util::getDefaultEmailAddress($this->defaults->getName())]);
+                       $message->setFrom([\OCP\Util::getDefaultEmailAddress($this->defaults->getName()) => $this->defaults->getName()]);
                }
 
                $failedRecipients = [];