Documentation

Action: sending email

For sending an email by an action is possible to use a series of methods described in the manual.

For example if you would send an email using a template configured in the “Template email” functionality that you can find in the Administration menu of the application.
emailTemplate

Here an example:

var from = 'prova@sinesy.it';
 
var templateId = 9;
 
var priority = null; /* 0 minimum, 1 normal, 2 high, null is default (normal) */
 
var isHtmlContent=true; /* is the body written in HTML or text only? */
 
var voObj=new Object(); /* Object Containing the template parameters (if there's any) in camelCase */
 
voObj.par1='valore parametro 1';
 
var filesToAttach = null; /* absolute path to files */
 
utils.sendAlertEmailFromTemplateWithEmailAddresses(from,
templateId, /* emailTemplateID */
destinations,
priority,
isHtmlContent,
voObj,
filesToAttach);