Answered
Hi all,
is it possible to create a script for an email button that will have a default subject heading that i want, and also can i get the address to send it too from a field on the pdf.
For example, i have a PDF that has "Joe Bloggs" details on! On the PDF, under a field called "Email" it has his email address "Jo@123", how can i send the form to him at the that address with a subject heading called "Hello".
Any help to any of them would be greatly appreciated!
Thank you
I have mine on a list field named CCList with the name showing and the export value has the email address already in the field. But you could use a text field into which the email has been entered.
var address = this.getField("CCList").value
var sub = "Complaint Disposition form";
var msgBody = "Attached is the Complaint Disposition form.";
var cResponse = app.alert({
cMsg: "To email this form, select email addresses from the EMAIL FORM TO list. Hold CTRL to select multiple addresses. \n\nYou will be able to add other email addresses after you click YES.\n\nProceed?\n\nClick YES to proceed.\nClick NO to go back and select addresses.",
nIcon: 2, nType: 2,
cTitle: "Email Form"});
// proceed only if response is "YES"
if (cResponse == 4) {
this.mailDoc({
bUI: false,
cTo: address,
cSubject: sub,
cMsg: msgBody,
cSubmitAs: "PDF"
});
}