diff options
author | Joas Schilling <coding@schilljs.com> | 2017-10-18 15:41:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 15:41:18 +0200 |
commit | bea04d12d5a9ae8653277fc6379468d990f397ea (patch) | |
tree | 8b6b34a0e4a5f822fa5e451462fe5fe67fafceb0 /core | |
parent | 8e884ba52fe3796d0da1e108a7a8fb1b43e6d554 (diff) | |
parent | cc798fd65f48e4cfc4748f35859c453a6eff4e25 (diff) | |
download | nextcloud-server-bea04d12d5a9ae8653277fc6379468d990f397ea.tar.gz nextcloud-server-bea04d12d5a9ae8653277fc6379468d990f397ea.zip |
Merge pull request #6515 from nextcloud/templating-of-email-subjects
Allow templating of email subjects
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/LostController.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 4c59b0a1c00..04a3a07bea2 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -309,6 +309,7 @@ class LostController extends Controller { 'link' => $link, ]); + $emailTemplate->setSubject($this->l10n->t('%s password reset', [$this->defaults->getName()])); $emailTemplate->addHeader(); $emailTemplate->addHeading($this->l10n->t('Password reset')); @@ -327,10 +328,8 @@ class LostController extends Controller { try { $message = $this->mailer->createMessage(); $message->setTo([$email => $user->getUID()]); - $message->setSubject($this->l10n->t('%s password reset', [$this->defaults->getName()])); - $message->setPlainBody($emailTemplate->renderText()); - $message->setHtmlBody($emailTemplate->renderHtml()); $message->setFrom([$this->from => $this->defaults->getName()]); + $message->useTemplate($emailTemplate); $this->mailer->send($message); } catch (\Exception $e) { throw new \Exception($this->l10n->t( |