RFC: Email templates
Email is a critical component for most of apps built with PubSweet and I see a number of issues that are related to emails and email templates in one way or another: !587, #435, #433 (closed), #356, and others.
We do have a templating system developed by Hindawi (!413 (merged)), but it's not reused in all relevant parts, and the templates themselves are hard-coded, not configurable.
It is a significant task to standardise how emails are templated and sent from all core parts, so I was thinking we could use this opportunity to remove some of our custom code in favour of a popular 3rd party email templating solution, namely: https://github.com/forwardemail/email-templates https://email-templates.js.org/
In this RFC I want comments on the following plan:
- replace a large part of our email templating component with a thin wrapper around
- use the templating system for all components in PubSweet's core (password reset emails, signup verification, etc)
- add ability to configure templates (perhaps also in a dynamic way i.e. store templates in a database model)
I believe that a simplified (and standard) email approach will be very beneficial for everyone in the community. Let me know what you think!