Live data from Hacker News

JSX Mail: Ending All Your Problems When Creating Email Templates

jsx-mail.org

21–30 of 60 posts

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#21

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

Agreed that MJML is great, but I wouldn't call JSX a useless abstraction. Using JSX as a templating language for MJML has real benefits, like being able to use javascript directly in templates instead of having to remember handlebars/mustache/nunjucks/etc templating syntax.

And libraries like mjml-react make it really easy.

https://github.com/wix-incubator/mjml-react/

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#22
This looks interesting but I think I'll stick with MJML [1] for a while.

I can see that a few other people already brought up MJML so I hope I can have some value added but basically MJML is fanatical about making sure all their changes are supported on a very wide range of email clients. They have hundreds of contributors and 10k+ starts on Github all fixing bugs and compatibility. The project has 2000+ commits. Any new framework that comes out is going to have a lot of catching up to do.

When I use MJML I feel very confident my email will work on many different email clients. And even be responsive.

[1] https://mjml.io/

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#25
post #21

Just use MJML ( https://github.com/mjmlio/mjml ) or mrml ( https://github.com/jdrouet/mrml ). It solves the real problems with building emails without introducing useless abstractions like JSX.

Agreed that MJML is great, but I wouldn't call JSX a useless abstraction. Using JSX as a templating language for MJML has real benefits, like being able to use javascript directly in templates instead of having to remember handlebars/mustache/nunjucks/etc templating syntax. And libraries like mjml-react make it really easy. https://github.com/wix-incubator/mjml-react/

Came here to saw we use mjnl react and it's awesome to be able to wrap mjml in your own components.

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#26
post #9

Check out https://mailing.run . Similar project that can be embedded or run as a standalone API. Also uses MJML which is indispensable for cross-client compatibility. Another tip, I highly recommend a CSS minifier which inlines styles to fix a variety of CSS priority issues.

Okay this looks really cool! Thanks for sharing!

Re: JSX Mail: Ending All Your Problems When Creating Email Templates

#30
Funny a few years ago I built exactly this for our company mailings. We checked out several frameworks and those are great if you only need an Email to look somewhat good and not have too specific of requirements.

But our Emails had to replicate other teams designs 1:1 pixel perfect. So we mostly used the same code blocks.

I needed some sort of framework that would organize those code blocks and jsx was perfect. I generated twig templates out of the JSX and used php to send the emails.

Post reply on HN