Here's three examples that might help:
Emailing a PDF
To mail the PDF document to the specified e-mail address when the button is selected,
in the script window, enter the following text in the exact format, and click OK:
// use mailDoc in this routine
this.mailDoc(true, "yourname@address.com",
"cc goes here", "bcc goes here","Subject goes
here");
+++++++++++++++++++++++++++++++
this.mailDoc({
bUI: false,
cTo: "john@yourcompany.com",
cCC: "peter@yourcompany.net",
cSubject: "Beta Test Report",
cMsg: "This attached PDF form has been completed as requested. Thanks from George Howard for completing this form. He will use this information to improve his website."
});
+++++++++++++++++++++++++++++++
// This is the form return email. It's hardcoded
// so that the form is always returned to the same address.
// Change address on your form to match the code below
var cToAddr = "formsAdmin@yourcompany.com"
// First, get the client CC email address
var cCCAddr = this.getField("ClientEmail").value;
// Now get the beneficiary email only if it is filled out
var cBenAddr = this.getField("BennyEmail").value;
if(cBenAddr != "")
cCCAddr += ";" + cBenAddr;
// Set the subject and body text for the email message
var cSubLine = "Employee Performance Evaluation Form"
var cBody = "This form has been completed as per company policies and submitted for your review.\n" + "If you need clarification or have questions you may contact me using the from address in this message.\n"+"Please save the filled PDF form attachment for your own records and open it with Adobe Reader."
// Send the entire PDF as a file attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});