Neptune DXP Documentation
Email Template
With Email Template, you can create templates for emails. Server scripts can use these templates to send email notifications from a workflow step, using the Workflow editor.
Code snippet for calling an email template
You can use the following code snippet for calling your email template from a script:
const html = "<html><body>Hello</body></html>";
await sendEmail("to@email", "Subject", html);
const attachments = [{
filename: "filename.txt",
path: "/path/to/file.txt"
}]
await sendEmail("to@email", "Subject", null, "from@email", "template-id", {name: "John"}, attachments);