AnsweredAssumed Answered

Pass parameters email template

Question asked by afistolao on Mar 15, 2010
Latest reply on Jul 29, 2010 by lucille.arkenstone
i have defined a web script wich send an email using a template to populate the body. The web script works, but i need to pass parameters to the template, i have tried using the model variable in the javascript but it doesn´t work.
Somebody can help me?
This is the javascript code for the web script
   var mail = actions.create("mail");
   var objeto =;
   var jsonMail = eval("("+objeto+")"); =;
   mail.parameters.subject = jsonMail.subject;
   mail.parameters.from = jsonMail.from;
   var mailSubject = mail.parameters.subject;
   logger.log("mailSubject: " + mailSubject);
   mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/plantilla.ftl");
   mail.parameters.loquesae = jsonMail.fields;
   var mailMatter = mail.parameters.text;
   mail.parameters.text = "Correo con asunto: "+jsonMail.subject;