I wish to send an e-mail using a javascript and a Freemarker Template.
I can send an e-mail via my javascript using the Javascript Input tab of the Console.
I have tried using the "Freemarker Input" and I can see "Freemarker HTML Output" if I use the ${companyhome} type nodes; but I get an error if I used the ${space},${space.name}, ${document} etc nodes.
Error is:
<strong>
500 Internal Error
An error inside the HTTP server which prevented it from fulfilling the request.
03240034 Wrapped Exception (with status template): 03241463 Error during processing of the template 'Expression space is undefined on line 1, column 7 in string://fixed.'. Please contact your system administrator.
</strong>
What am I doing wrong? Should I pass nodes to the "FreeMarker Input" template from my javascript? If so, how?