Hacker News new | ask | show | jobs
by cies 1911 days ago
MJML deserves a mention. We use it, together with mustache, to let users create their own mailings from some building blocks we offer.

Works quite well!

9 comments

MJML is great. We’ve developed a few hundred emails with it at this point and trained non-developers quite successfully. They use the MJML-provided editor or the Visual Studio plugin, and their visual Git tool of choice to make it easy to share components.
I love MJML. Though the output delivers on the promise only 95% of times (I had to bend it a bit because of Gmail on iPhones), the experience for me as a developer is 100x better than working with visual builders.

I was able to recreate our purchased template in like 15 minutes, now it’s much easier to edit.

95% is an excellent number compared with hand crafted templates. I'm going to look into this, thank you for the suggestion!
Huge fan of MJML! I've been using it to send out my [shameless plug]weekly nerd-focused newsletter (see bio)[/shameless plug] and I've got a nice workflow going with it.

I'm using a workflow of Pug (nice and short syntax to save on keystrokes) -> MJML (via Pug mixins) -> HTML.

MJML has a really nice Visual Studio Code plugin that has live reload on edit, so it's all a super nice locally-hosted way to develop rich text emails.

Happy to answer any questions or share my workflow/code with anyone. Still refining it but it's a nice system and has gotten my time to build and send a newsletter down from many hours to several hours :)

would love to know about your workflow & link to the code :)
We use mjml as well, together with nunjucks. It's awesome :). No more HTML wrestling for all the different clients.
Any chance you could share some more details around how you integrated mustache with MJML? I did a project almost 3 years ago now where we used MJML and Handlebars, but I was never happy with the end result and have been thinking about going back and taking another stab.

Did MJML add any support for templating engines as part of the rendering process? That didn't seem to be an option when I did the original process so we had a 2 pass solution (MJML -> HTML w/Handlebars -> HTML).

The solution we have is quite complex, as it also includes a builder where client can drag-drop blocks to create template (with text variables) for mailings.

Mustache is used for color/font substitutions and also for text variable (like $recipient_name) substitutions.

So: JSON representation of an email -> HTML+Mustache -> HTML+Mustache (only variables) -> HTML

For (live during email building) previews we skip the last step and show the Mustache syntax.

which builder are you using? i hav ea similar mjml + mustache setup, and am using blocksedit.com for client drag/drop. would love to see your setup!
In house developed builder in Reacts + Typescipt + JSON schema, we buildt is to be part of our SaaS offering to our clients.
I haven't seen blockedits.com before, it looks really cool. What are your thoughts on it? Is it worth taking a deeper look at or would you choose something else if you were starting from scratch?
There's also Parcel which is a dedicated email code editor.

https://www.useparcel.com

I haven't worked with it, but others on my team have used it to support high-visibility magazine newsletters, etc. Works great.
MJML is insanely cool. I've just switched over to it and saved myself a ton of pain in creating consistent HTML emails.
Curious, is this an in internal product?