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.
This project is designed to be deployed onto AWS Lambda using the Apex framework.
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
/functions
— Email templates. One template per function./shared
— Code that is shared between templates./utils
— Utility functions.
React-MailMerge is developed and maintained by Impraise. Issue reports and pull requests are greatly appreciated!