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>
$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 = [];