Hi everyone,I know it's been already asked before, but I can't get it working with any solutions provided on this forum…I'm trying to send an email from a workflow with no success. I successfully managed to make it work as a webscript:xxx.get.js:
var node = person;
var mail = actions.create("mail");
mail.parameters.to = node.properties.email;
mail.parameters.subject = "TEST Send Mail Webscript";
mail.parameters.text = "test webscript";
mail.execute(node);
I managed the outgoing mail setup and it works fine.Here is my AlfrescoJS (workflow):
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "TEST Send Mail Workflow";
mail.parameters.text = "test workflow";
var node = bpm_package.children[0];
mail.execute(node);
In examples, I find 2 different syntaxes:
var node = bpm_package;
and
var node = bpm_package.children[0];
Which one is the right one? Depends on what?Thanks in advance for any reply or ideas?