Problem/Motivation

When defining a twig template inside a module it's not being picked up.

It only picks up when we define template in the theme otherwise only picks up swiftmailer.html.twig from swiftmailer/templates/swiftmailer.html.twig

Steps to reproduce

- Create a custom module call 'test_emails'
- Add a hook_mail
- Setup mailhog for mail catching
- Enable twig debugging in developement.services.yml as per https://www.drupal.org/docs/theming-drupal/twig-in-drupal/debugging-twig...
- Set a theme in mailsystem settings page (admin/config/system/mailsystem)
- Add a template in test_emails module i.e. swiftmailer--test-module.html.twig
- Send an email
- The email will not pickup the template and will use swiftmailer.html.twig

Proposed resolution

Discussion and Directions

Remaining tasks

Create a PR

User interface changes

None

API changes

Not known at this stage

Data model changes

Not known at this stage

Comments

amjad1233 created an issue.

ziobudda’s picture

Any news about this issue ?

ziobudda’s picture

[DELETE]