summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail/Mailer.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-06-06 14:17:04 +0200
committerJoas Schilling <coding@schilljs.com>2017-06-06 14:23:03 +0200
commit3af8abb0983b201c2b2fb412b44592a9a512582d (patch)
treec7842405d6a1362313340fbcd203a8356fdfb09b /lib/private/Mail/Mailer.php
parentc092b33466d16b6e2119973315b07546c9deb035 (diff)
downloadnextcloud-server-3af8abb0983b201c2b2fb412b44592a9a512582d.tar.gz
nextcloud-server-3af8abb0983b201c2b2fb412b44592a9a512582d.zip
Allow to overwrite the email template again
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Mail/Mailer.php')
-rw-r--r--lib/private/Mail/Mailer.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 80988d85701..b24f72316ba 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -90,6 +90,16 @@ class Mailer implements IMailer {
}
public function createEMailTemplate() {
+ $class = $this->config->getSystemValue('mail_template_class', '');
+
+ if ($class !== '' && class_exists($class) && is_a($class, EMailTemplate::class, true)) {
+ return new $class(
+ $this->defaults,
+ $this->urlGenerator,
+ $this->l10n
+ );
+ }
+
return new EMailTemplate(
$this->defaults,
$this->urlGenerator,