aboutsummaryrefslogtreecommitdiffstats
path: root/settings/Mailer
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-15 10:59:11 +0200
committerJoas Schilling <coding@schilljs.com>2017-10-18 15:12:03 +0200
commit8b37fe7f6534ad16bd9a357036e95e748e2068e3 (patch)
treec7a11a26232a0e117d0b2b3c95a2d79b7985967b /settings/Mailer
parentf109c1a10c9f5acf0d5d3e4f864e3702f99db937 (diff)
downloadnextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.tar.gz
nextcloud-server-8b37fe7f6534ad16bd9a357036e95e748e2068e3.zip
Set the subject with the email template to allow theming
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/Mailer')
-rw-r--r--settings/Mailer/NewUserMailHelper.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/settings/Mailer/NewUserMailHelper.php b/settings/Mailer/NewUserMailHelper.php
index c111ffeb4fa..af1627a08e3 100644
--- a/settings/Mailer/NewUserMailHelper.php
+++ b/settings/Mailer/NewUserMailHelper.php
@@ -124,6 +124,7 @@ class NewUserMailHelper {
'resetTokenGenerated' => $generatePasswordResetToken,
]);
+ $emailTemplate->setSubject($this->l10n->t('Your %s account was created', [$this->themingDefaults->getName()]));
$emailTemplate->addHeader();
if ($displayName === $userId) {
$emailTemplate->addHeading($this->l10n->t('Welcome aboard'));
@@ -159,7 +160,7 @@ class NewUserMailHelper {
IEMailTemplate $emailTemplate) {
$message = $this->mailer->createMessage();
$message->setTo([$user->getEMailAddress() => $user->getDisplayName()]);
- $message->setSubject($this->l10n->t('Your %s account was created', [$this->themingDefaults->getName()]));
+ $message->setSubject($emailTemplate->renderSubject());
$message->setHtmlBody($emailTemplate->renderHtml());
$message->setPlainBody($emailTemplate->renderText());
$message->setFrom([$this->fromAddress => $this->themingDefaults->getName()]);