I am using HTML Mail module. I have created an html email template specific to my form(webform) in the template folder of my theme directory. My form name is newsletter and the template name is htmlmail--webform--newsletter_email.html.twig
I want to override the email body based on a particular language. But my problem is that hook_mail_alter
doesn't work in my case.
Drupal API documentation for hook_mail_alter
says that hook_mail_alter()
allows modification of email messages created and sent with MailManagerInterface->mail()
.
Any help?