micronaut-projects / micronaut-email

Apache License 2.0
3 stars 4 forks source link

Consider supporting MJML #103

Open sdelamo opened 2 years ago

sdelamo commented 2 years ago

Feature description

https://mjml.io

mkimberlin commented 2 years ago

We use MJML to help with the creation of appealing, responsive emails. As I understand it there are a couple of ways to interact with MJML templates. The first is using the MailJet API. I know of a couple of java libraries that have tried to enable this:

There is also a JavaScript library that performs the conversion without a call to the REST API:

We have a couple of needed use cases. The first and currently implemented is the loading of an MJML file from our web UI and conversion on the frontend with the JavaScript library, which is sent as HTML to our Micronaut app. While we could handle that by sending that over to the API, I'm not sure that we have a specific reason to do that. However, I could see the potential for a use case where someone might want to send over the MJML file for processing on the server. However, we definitely need to have the ability to store templates as resource files in our app and then be processed, rendered (including dropping in templated values), and sent in response to events and scheduled notifications.

sdelamo commented 2 years ago

I think this probably would need to be implemented in Micronaut Views.