summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-06 10:00:34 -0500
committerGitHub <noreply@github.com>2017-06-06 10:00:34 -0500
commit4a3e118adde6968efe43bf3b0a32698e286964ae (patch)
tree0c5042293b7346260236e47810062bf16358d2e1 /lib
parent15314b6f5b7914a72ca1b424a13ecd82163a8f14 (diff)
parent3af8abb0983b201c2b2fb412b44592a9a512582d (diff)
downloadnextcloud-server-4a3e118adde6968efe43bf3b0a32698e286964ae.tar.gz
nextcloud-server-4a3e118adde6968efe43bf3b0a32698e286964ae.zip
Merge pull request #5268 from nextcloud/allow-to-theme-emails
Allow to overwrite the email template again
Diffstat (limited to 'lib')
-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,