A FreeMarker template can be used to generate the body of the email. Optional metadata can also be used with the template to insert values from process variables into the document template.
An example of the metadata that can be used by the template is:
{ "iceCream": { "flavor":"Mint" }, "timeOfYear": { "season":"Summer" } }
An example of how the template can import values from the metadata is:
<html> <head> <title>Welcome!</title> </head> <body> <h1>Welcome to ${timeOfYear.season}!</h1> <p>Our latest product is ${iceCream.flavor} ice cream!</p> </body> </html>