swiftmailer.html.twig template ignored when Mail Safety is active

Created on 26 November 2022, about 2 years ago
Updated 18 April 2023, over 1 year ago

The swiftmailer.html.twig template in my own themes template directory is ignored when Mail Safety is active and the mails are send out manually on Mail Safety dashoard /admin/config/development/mail_safety ("Send to default mail").

The only way to get it run is to activate all of the Mail Safety options:
āœ“ Stop outgoing mails
āœ“ Send mail to dashboard
āœ“ Send mail to default mail

But using the "Send mail to default mail" on Mail Safety dashboard to send out mails manually causes the problem: swiftmailer.html.twig template in custom theme is ignored and the mails are not formated correctly.

How can this be solved?

šŸ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

šŸ‡¦šŸ‡¹Austria drupalfan2

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡¦šŸ‡ŗAustralia ajlow

    Something similar happens with MIME Mail module, only the difference is I have to disable all the Mail Safety options to make it run. If any of the Mail Safety options are activated, the email template used is the the MIME Mail module twig file instead of the twig file in my custom theme directory. I found this out when I enabled debugging and saw this in my email raw source:

    <!-- BEGIN OUTPUT from 'modules/contrib/mimemail/templates/mimemail-message.html.twig' -->

    Disabling all the Mail Safety options gives me the expected result:

    <!-- BEGIN OUTPUT from 'profiles/drupalexp_nation/themes/nation/templates/mimemail-message--custom_cron.html.twig' -->

Production build 0.71.5 2024