Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.
/ react-mailmerge Public archive

Render email templates using serverless React!

Notifications You must be signed in to change notification settings

impraise/react-mailmerge

Repository files navigation

React-MailMerge

Build Status codecov

Rendering templates is slow. If your website sends transactional email, it's probably rendering a lot of templates, since every email uses at least one template.

Rather than making your backend servers render all those templates, React-MailMerge allows you to offload that work to AWS. React-MailMerge runs on AWS Lambda, and exposes an API for each email template. Your backend servers can call these APIs with batches of user data, and React-MailMerge will render the templates on Lambda and pass the rendered versions to your mail delivery system.

AWS Lambda

This project is designed to be deployed onto AWS Lambda using the Apex framework.

AWS profile and credentials

To deploy templates you will need an AWS account with access to lambda functions. The Apex documentation details the minimum required IAM policy for this account.

You should store your AWS credentials in the ~/.aws/credentials file, like this:

[mailmerge]
aws_access_key_id = xxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxx

Project Structure

  • /functions — Email templates. One template per function.
  • /shared — Code that is shared between templates.
  • /utils — Utility functions.

Credits

React-MailMerge is developed and maintained by Impraise. Issue reports and pull requests are greatly appreciated!

Impraise logo