cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameters email template

afistolao
Champ in-the-making
Champ in-the-making
hi,
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
çscript:{   var mail = actions.create("mail");   var objeto = args.email;   var jsonMail = eval("("+objeto+")");   mail.parameters.to = jsonMail.to;   mail.parameters.subject = jsonMail.subject;   mail.parameters.from = jsonMail.from;   var mailSubject = mail.parameters.subject;   logger.log("mailSubject: " + mailSubject);   model.formTitle=jsonMail.title;   model.datos=jsonMail.fields;   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;   mail.execute(mail.parameters.template);   model.res=jsonMail.to;   model.email=objeto;}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Thanks!!!
1 REPLY 1

lucille_arkenst
Champ in-the-making
Champ in-the-making
Does anybody have the answer to this?  I am want to do the same thing too.  :mrgreen: