Print Page | Close Window

Email Script in LiveCycle v9.0

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: [Commercial] Adobe LiveCycle Designer Forms
Forum Description: Discussions relating to Adobe LiveCycle Designer and XFA forms.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=741
Printed Date: 22 Aug 2019 at 8:58pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: Email Script in LiveCycle v9.0
Posted By: Camping5
Subject: Email Script in LiveCycle v9.0
Date Posted: 21 Mar 2013 at 8:07pm
I have created a pretty basic form through LiveCycle, I need to have the form emailed to a specific user. However, I need the form emailed, not just the data. I have created on in the past using a nice 'mouse up*' script, but I am unable to get it to work.
 
The script was written about two years ago and is a basic one that takes two of the fields and fills in blanks in the email subject and body. When I save (all the save steps) the form and then re-open in Acrobat Reader, I will get the message to fill in the boxes I left empty, but the email box will  not open! I have looked at teh warning/log in LiveCycle, but tehre is nothing. Here is the script....can you tell me why I am unable to email this form??
____________________________________________________________________________
if (form1.execValidate() == true){  

if (employeename.rawValue != null || employeename.rawValue != "") {

vSubject = "Emerging Technology Evaluation Request form " + employeename.rawValue;

vBody = "The form has been sent by " + employeename.rawValue;

}

if (Date.rawValue != null || Date.rawValue != "") {

vBody = vBody + " on " + Date.rawValue;

}

var oDoc = event.target;

oDoc.mailDoc({

bUI: true,

cTo: "betty.smith@email.org",

cSubject: "Emerging Technology Evaluation Request from " + employeename.rawValue + " ",

cMsg: "Attached please find my completed Emerging Technology Evaluation Request form."

})

}

_________________________________________________________________________
(it is showing a return after the first if, there is no return)
 
Thank you, my frustration level is getting very high!!
 
Teresa


-------------
Teresa W



Replies:
Posted By: NKowa
Date Posted: 23 Mar 2013 at 6:32pm
Upgrade to the latest version of Adobe Reader, because it supports email attachments in PDF format, or you need to enable usage rights on the LiveCycle PDF using Adobe Acrobat Standard/Professional 7+.

Also, I don't see where you are passing the submission format in your mailDoc method. You may want to pass the PDF format in one of the parameters.

Note: It is easier to just add a regular "button" instead of scripting. Under the "button" properties, select "submit" as type, select the format "PDF", and enter the email address of the recipient starting with "mailto:" for the submit URL attribute.

example button submit URL:
mailto:account123@gmail.com

Or you can submit to a server-side script, such as PHP or ASP.net and send the attachment using SMTP without the need for 3rd party email software such as MS OUTLOOK.

For more information and online examples:
http://www.pdfemail.net - http://www.pdfemail.net



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net