If you have ever tried programmatically sending HTML emails, you probably know how giant of a pain in the rear it is. It’s all because while HTML has progressed in the world of Internet, the Email HTML is still way way behind. There are no set standards and most of the times, you end up doing too much manual HTML coding. In today’s world, surely there must be something you can do about it, right? Turns out, yes. MJML tries to standardize and speed up HTML email layout creation. Think of it as Bootstrap for Email. MJML comes with it’s tagging format. The resulting layouts are very cross-platform and responsive, just like today’s modern websites are. Granted, things can never be 100% perfect in the Email world, but MJML gets you to at least 90% there.
Then, if you are using Python you can make Emails dynamic using Jinja library. There is some work involved in tying the two together, i.e. making MJML and Jinja work seamlessly, but once set up, they work very very nicely.
1 thought on “mjml + jinja2 = awesome”
Where is the article showing us how to setup Jinja and mjml?