-
Notifications
You must be signed in to change notification settings - Fork 38
Description
| Q | A |
|---|---|
| Bug? | no |
| New Feature? | yes |
| Community Bundle Version | ^2.0@dev, 17e2867 |
| Sulu Version | 2.6.5 |
| Browser Version | - |
Actual Behavior
Currently we can only define one email template per type (registration, email confirmation, ...).
If you use an HTML template Symfony will automatically generate a text version based on the following rules:
https://symfony.com/doc/current/mailer.html#text-content
When you have an advanced template with a footer with a lot of information this has the downside, that probably the indentation is completely off. Also sometimes we just want to have a different templates for html and text.
Expected Behavior
It would be good to be able to define two separate templates.
Steps to Reproduce
Possible Solutions
Maybe we could have user_template and admin_template and additionally user_template_plain and admin_template_plain.
Or, my preferred option, we define it like user_template: community/email-confirmation-email and it will automatically try to find community/email-confirmation-email.html.twig and community/email-confirmation-email.txt.twig.
Also see: https://symfony.com/doc/current/mailer.html#text-content
I'm open to create a PR for my preferred approach.
Btw instead of new Email we could also use new TemplatedEmail.