resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
14.01k stars 631 forks source link

Can we have a way to create output html as ejs template ? #381

Closed arghyaiitb closed 1 year ago

arghyaiitb commented 1 year ago

Emails are generally sent by the backend, and most developers would use some kind of template engine in node or use template feature of email service provider.

Since we are having a way to pass props to react emails, can we expand this to convert the props to be configured as an ejs template?

zenorocha commented 1 year ago

@arghyaiitb I see your point, but the problem is that every email service provider uses a different templating language. For example:

Adding support for Handlebars, Mustachio, EJS, etc is simply not scalable at this point.

DarkPhoenix2704 commented 1 year ago

@arghyaiitb If you are using nest js, you can use this adapter to pass props

https://github.com/webtretech/nestjs-mailer-react-adapter