Closed ghost closed 6 years ago
MJML is created and maintained by Mailjet, which is one of SparkPost's competitors. I guess they don't want to use the open-sourced product of one of their competitors and prefered to build their own for obvious reasons. As always, when there are more than one library to do the job, test them and choose the one that fits your need.
Hey 👋
MJML is a really great tool! There were a few things that we were hoping to improve on with HEML. The biggest thing is the developer experience. HEML sits as a thin layer on top of HTML and CSS. It mirrors HTML as closely as possible so you can use that same knowledge to quickly develop emails. i.e. for the body you use a <body>
tag, for a button you use a <button>
tag. This also shows when you're trying to style something. In HEML you can style a button using CSS in the exact way you'd expect.
button {
background: blue;
}
Beyond that, you can use vanilla HTML throughout your HEML. If you throw a <div>
in with some styling, HEML will do its best to make the CSS as safe as possible and inlines it where necessary.
HEML also hands back any and all metadata collected, such as the subject or preview. This lets you develop around and extend HEML with a bit more power.
For advanced users, we know that we can't handle every use case so you can use custom pseudo-elements on the HEML elements so you can style them in any way possible.
MJML has really strong features, itself. It has a larger community, it's battle tested, has more tooling, and has an amazing team!
Like @grebett said, test both and see which one fits your needs! In the end we all want email to be better for the recipient and easier for the developer, so use whichever tool works for you 😄
Great satisfying answer from @avigoldman 😄
I will for sure give a try with HEML, I've used MJML in the past, and it was pretty good.
The idea behind element usage the same way as in HTML seems to be really handy.
Thanks for the kind words. Feel free to ping me or open another issue if you hit any blockers!
What is the main purpose in HEML?
I was intrigued by this release (of HEML), since I'm user of SparkPost, but it seems to be a copy of MJML.
Could you please point out some of main differences, please ?
One major difference between these two, is component naming, HEML uses more friendly names, like:
<container>
vs<mj-container>
But that's not deal breaker.