Email templates based on a templating language ([url removed, login to view])
Goal: to generate emails with dynamic content (JSON file based email batch creation).
- handlebars takes a template with the variables and compiles it into a function
- the function executeds by passing a Json object as an argument. This Json object is known as context and it contains the values of the variables used in the template (Handlebars expressions)
- on its execution, the function returns the required HTML after replacing the variables of the template with their corresponding values
- the html rendered must be returned to the end user as regular HTML under a url (must not contain any reference to <script> tags).