Reputation: 15388
I'm looking for reactjs responsive email framework.
I found MJML, but it is for static templates. I need to generate a dynamics template. I wanna pass data from database to template.
Can you suggest some good solution?
Upvotes: 0
Views: 205
Reputation: 1028
Solutions are available without reactjs.
You're right: MJML handles only static templates.
Lots of email authors are using packages like Handlebars with MJML for the dynamic piece. They write the MJML with Handlebars variables embedded. They run the MJML template through Handlebars, which creates a series of templates, each with the variables replaced from a database, for example. Then, they run the MJML compiler to create the HTML output for all those emails.
Handlebars has competitors. The MJML team has decided not to expand the scope of their project to include variables (as of this writing). That way, their users can pick which of the dynamic packages best meets their particular needs and they're better served.
Some recommend using Gulp to automate the process. The MJML team supports one such Gulp implementation.
A great place to get MJML support is https://slack.mjml.io/
Good luck.
Upvotes: 2