Strapi plugin logo for React email

React email

Send react-email using strapi. Enables JSX/TSX template with react and tailwind. Also enables localization of templates

Strapi plugin strapi-react-email

This is strapi plugin which enables react-email. The React email is nice package to create modern emails.

Features

  • Create react email template by JSX/TSX
  • Prepare all setting for email. Subject, from, replyTo etc.
  • Live preview of final html code send by e.g. nodemailer
  • Prepare test data for your email e.g. User info and see result immediately
  • Send test email
  • Localization enabled

Api

1strapi.plugin('strapi-react-email')
2      .service('reactEmail')
3      .sendEmail({
4        id,
5        slug,
6        to,
7        locale: 'en',
8        emailProps,
9      })
  • id - id of email template gathered from admin panel, could be undefined but slug must be used
  • slug - slug prefer way how to use email template, could be undefined but id must be used
  • to - recipient
  • locale - localization
  • emailProps - custom object which is passed to JSX/TSX code

Limitation

  • At the end of any template there is injected code by server. This means that entry component is Email!
1`\nresultHtml = render(Email({ ...emailProps }));`
  • Of course components using import/export could not be done. Everything is in one string.
  • Preview is done by iframe. So any external links will not work due to blocked csp.

Install now

npm install strapi-react-email

STATS

No GitHub star yetNot downloaded this week

Last updated

388 days ago

Strapi Version

4.0.0 and above

Author

github profile image for Daniel Lazar
Daniel Lazar

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.