Merge pull request #5268 from nextcloud/allow-to-theme-emails
Allow to overwrite the email template again
This commit is contained in:
commit
4a3e118add
|
@ -966,6 +966,13 @@ $CONFIG = array(
|
||||||
*/
|
*/
|
||||||
'systemtags.managerFactory' => '\OC\SystemTag\ManagerFactory',
|
'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
|
* Maintenance
|
||||||
*
|
*
|
||||||
|
|
|
@ -90,6 +90,16 @@ class Mailer implements IMailer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createEMailTemplate() {
|
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(
|
return new EMailTemplate(
|
||||||
$this->defaults,
|
$this->defaults,
|
||||||
$this->urlGenerator,
|
$this->urlGenerator,
|
||||||
|
|
Loading…
Reference in New Issue