additional fix to #18730 #18733

regarding to advice from @kesselb
This commit is contained in:
exner104 2020-01-08 10:40:52 +01:00 committed by GitHub
parent 44eba5cdc6
commit 5c517baf98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -620,6 +620,14 @@ class ShareByMailProvider implements IShareProvider {
$emailTemplate->addBodyText($this->l->t('You can choose a different password at any time in the share dialog.'));
$emailTemplate->addFooter();
$instanceName = $this->defaults->getName();
$senderName = $this->l->t(
'%1$s via %2$s',
[
$initiatorDisplayName,
$instanceName
]
);
$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
$message->setTo([$initiatorEMailAddress => $initiatorDisplayName]);
$message->useTemplate($emailTemplate);