Allow to overwrite the email template again

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-06-06 14:17:04 +02:00 committed by Lukas Reschke
parent 336ce139ae
commit c6f57fe22d
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with 17 additions and 0 deletions

View File

@ -977,6 +977,13 @@ $CONFIG = array(
*/
'systemtags.managerFactory' => '\OC\SystemTag\ManagerFactory',
/**
* Replaces the default mail template layout. This can be utilized if the
* options to modify the mail texts with the theming app is not enough.
* The class must extend ``\OC\Mail\EMailTemplate``
*/
'mail_template_class' => '\OC\Mail\EMailTemplate',
/**
* Maintenance
*

View File

@ -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,