1

Trying to send HTML mail from Webform using Mimemail

I've copied mimemail-messages.html.twig to my theme's folder and it's properly picked up. Problem is it's applied to all outgoing emails, user registrations and contact forms which is not desired.

Is it possible to isolate the outgoing theme to a single webform ?

I've read https://www.drupal.org/docs/8/theming/twig/working-with-twig-templates and tried re-naming mimemail-messages.html.twig to achieve some greater isolation when applying the theme.

Tried renaming the template to mimemail-messages--webform--myform.html.twig where myform is the form ID picked up from webform/manage/access_list/settings to no success

1
  • Go to your webform Settings > Email handlers and add new Email handler. Fill all necessary fields (from, to, subject) and above Body field select “Twig template” option and as body you can define custom html template which will be sent after each webform submission (or under specific condition if you would like). You can use webform submission values whencyou have Tokens module installed. Commented Aug 19, 2020 at 21:54

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.