Merge pull request #18733 from exner104/patch-1
Wrong email sender fix #18730
This commit is contained in:
commit
7e95c88c5f
1 changed files with 9 additions and 3 deletions
|
@ -620,9 +620,15 @@ class ShareByMailProvider implements IShareProvider {
|
|||
$emailTemplate->addBodyText($this->l->t('You can choose a different password at any time in the share dialog.'));
|
||||
$emailTemplate->addFooter();
|
||||
|
||||
if ($initiatorEMailAddress) {
|
||||
$message->setFrom([$initiatorEMailAddress => $initiatorDisplayName]);
|
||||
}
|
||||
$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);
|
||||
$this->mailer->send($message);
|
||||
|
|
Loading…
Reference in a new issue