Pass parameters email template

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2010 05:02 AM
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
Thanks!!!
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!!!
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2010 01:34 PM
Does anybody have the answer to this? I am want to do the same thing too. :mrgreen:
