How to send an email using mailDoc()?
Copy link to clipboard
Copied
I have a form that I need to send via email when a button is clicked. So, using the "Mouse Up" trigger I entered a "Run a JavaScript" action. Here's the code I entered into the "Create and Edit JavaScripts" box for the action:
//always send the email to HR
var cToEm = "me@mydomain.org"
// Get the employee's email address
var cEmpEm = this.getField("EmployeeEmail").value;
// Get the manager's email address
var cMgrEm = this.getField("ManagerEmail").value;
// Combine the two for the cc
var cCEm = cEmpEm + ";" + cMgrEm;
// Set the subject and body text for the email message
var cSubLine = "Catastrophe Timesheet for " + this.getField("NAME").value;
var cBody = "Please find attached document for " + this.getField("NAME").value.
// Send the entire PDF as a file attachment on an email
this.mailDoc({
bUI: true,
cTo: cToEm ,
cCc: cCEm ,
cSubject: cSubLine,
cMsg: cBody
});
But the emails aren't being sent. What am I missing?
Copy link to clipboard
Copied
I failed to mention that I'm using Adobe Acrobat Pro DC on a Windows 10 PC.
Copy link to clipboard
Copied
Check your Drafts folder...
On 10 October 2018 at 18:52, jeraldf7147659 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
This is why mail is really (in my opinion) a toy for testing, but any commercial or robust solution must use a professional web script, exactly as a web page form must. Indeed, web page forms are the future, PDF forms are dying fast.

