MJML template support for Twig template engine
This Symfony 4 bundle provides the integration of the MJML command line tool to create responsive emails as Twig templates.
It requires the installation of the MJML command line tools running with NodeJS.
It also supports custom HTML tags to avoid duplicating long MJML tags with a lot of options to ensure consistency amongst your templates.
Twig expressions can be used within the templates.
As compiling MJML code to HTML code is slow, this bundle follows this process:
- you write MJML templates with Twig expressions
- during cache warmup, these templates are compiled to HTML and Twig expressions are not resolved
- you use the compiled HTML templates with Twig and all the variables you need with you favorite email sending system