Where is the javascript code for the doc.mailDoc() function listed at the address listed below:


The instructions reference this code, but it is not included.

Gary Whitehead

9 Answers

Voted Best Answer

The you replace the "this.mailForm" method with the "this.mailDoc()" method.

You should have a copy of the Acrobat JS API Reference so you can see what the objects, properties, and methods are and what values you need to provide.

Are you using form fields to complete the action?

By George Kaiser   

Like the followring:

// This is the form return e-mail. Its hardcoded

// so that the form is always returned to the same address

// Change address on your form

cToAddr = "formsAdmin@BigCorp.com";
// First, get the client CC e-mail address

cCCAddr = this.getField("ClientEmail").value;
// Now get the beneficiary e-mail only if it is filled out

cBenAddr = this.getField("BennyEmail").value; if(cBenAddr != "") cCCAddr += "" + cBenAddr;
// Set the subject and body text for the e-mail message var cSubLine = "Form X-1 returned from client";

cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
// Send the form data as an FDF attachment on an e-mail

.mailForm({ bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody });
In the last paragraph of the tutorial are links to an Acrobat form and LiveCycle Desigenr form.

George Kaiser   

I need to submit (send) the form as a PDF to a specific e-mail address with no CC. Just to a single address.

Gary Whitehead   

The code provided is a sample, you can modify it as needed. If do not need a given parameter, then remove the parameter name and value, since the script is using the parameter name method for coding the function. If the parameter name were omitted,then you would replace the parameter value with a null string.

George Kaiser   

Unfortunately, I am a novice at javascript. I guess what I really need is an example of a script using the "this.mail.doc()" command.

Gary Whitehead   

No form fields will be used. The e-mail destination will just be a static e-mail address.

Gary Whitehead   

Be aware it's not "this.mail.doc()", but "this.mailDoc()". Also keep in mind that JS is case-sensitive, so make sure you use the method names and parameter names EXACTLY as they are specified in the tutorials.

Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com

Gilad D (try67)   

How can I attach the from in the email with a different name i want?

Mayank Tiwari   

Add a button field and place the code in the Mouse Up action using Run JavaScript and enter the code into to editor screen and save the entered data.

George Kaiser   

Please specify a reason: