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
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
Regards,
Nick K.
NK-Inc.com
FDF Toolkit .net: ASP.net library for PDF
Email PDFs with PDF Email .net