summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index b2e192b8309..42f2170122e 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -702,7 +702,6 @@ class Manager implements IManager {
\DateTime $expiration = null) {
$initiatorUser = $this->userManager->get($initiator);
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
- $subject = $l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename));
$message = $this->mailer->createMessage();
@@ -714,6 +713,7 @@ class Manager implements IManager {
'shareWith' => $shareWith,
]);
+ $emailTemplate->setSubject($l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename)));
$emailTemplate->addHeader();
$emailTemplate->addHeading($l->t('%s shared »%s« with you', [$initiatorDisplayName, $filename]), false);
$text = $l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]);
@@ -750,9 +750,7 @@ class Manager implements IManager {
$emailTemplate->addFooter();
}
- $message->setSubject($subject);
- $message->setPlainBody($emailTemplate->renderText());
- $message->setHtmlBody($emailTemplate->renderHtml());
+ $message->useTemplate($emailTemplate);
$this->mailer->send($message);
}