These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Submit Form Button > send to email address with subject heading based on a text field and specific copy in body of email

clibor
Registered: Aug 30 2010
Posts: 17

Hello all,
 
I'm trying to figure out how to create a button that would attach a filled PDF form
to the user's email client.
 
The address to be will be the return address of my choosing and the subject heading would based on a specific Text Field. I also want to include some text in the body of the email.
 
I found this script by Thom Parker but I can't seem to modify it to work for me. It includes adding a CC address but I don't want that. Just a return email address, Subject based on a text field and some body text.
 

// 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
var cToAddr = "formsAdmin [at] BigCorp [dot] com";
 
// First, get the client CC e-mail address
var cCCAddr = this.getField("ClientEmail").value;
 
// Now get the beneficiary e-mail only if it is filled out
var 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";
var 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
this.mailForm({bUI: true, cTo: cToAddr, cCc: cCCAddr,
cSubject: cSubLine, cMsg: cBody});
  
Any help would be appreciated.
 
CLIFF
 

My Product Information:
Acrobat Pro 9.2, Macintosh
NK-INC.COM
Registered: Apr 17 2010
Posts: 93
You might want to submit the PDF document to a server-side script, which could attach the pdf data or merged pdf document to a server-side email message.

Sending the e-mail using a server-side script would bypass any client e-mail software, and you could also parse the fields and insert the field values, ie: Name or Email, in parts of the subject, body, or recipients list.

For more information on how to send server-side PDF e-mail attachments without Client Email software such as Outlook, visit the PDFEmail.net website:
Link: PDFEmail.net
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It's not possible to set the return address with this method.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com