summaryrefslogtreecommitdiffstats
path: root/settings/Hooks.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-15 11:01:21 +0200
committerJoas Schilling <coding@schilljs.com>2017-10-18 15:12:03 +0200
commit3119fd41ceebbdab33c4dd86ce0b60b4dc9010e9 (patch)
treef79efab1f9506a452e54fd32e201234410969b1b /settings/Hooks.php
parentc9af36a9ab05e808df526a2054c30364ee02241c (diff)
downloadnextcloud-server-3119fd41ceebbdab33c4dd86ce0b60b4dc9010e9.tar.gz
nextcloud-server-3119fd41ceebbdab33c4dd86ce0b60b4dc9010e9.zip
Set the data from the template
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r--settings/Hooks.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php
index 3da85b4ae74..59bd7bb905d 100644
--- a/settings/Hooks.php
+++ b/settings/Hooks.php
@@ -132,10 +132,7 @@ class Hooks {
$message = $this->mailer->createMessage();
$message->setTo([$user->getEMailAddress() => $user->getDisplayName()]);
- $message->setSubject($template->renderSubject());
- $message->setBody($template->renderText(), 'text/plain');
- $message->setHtmlBody($template->renderHtml());
-
+ $message->useTemplate($template);
$this->mailer->send($message);
}
}
@@ -208,10 +205,7 @@ class Hooks {
$message = $this->mailer->createMessage();
$message->setTo([$oldMailAddress => $user->getDisplayName()]);
- $message->setSubject($template->renderSubject());
- $message->setBody($template->renderText(), 'text/plain');
- $message->setHtmlBody($template->renderHtml());
-
+ $message->useTemplate($template);
$this->mailer->send($message);
}
}