Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to send an email using mailDoc()?

New Here ,
Oct 10, 2018 Oct 10, 2018

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?

TOPICS
PDF forms
4.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2018 Oct 10, 2018

I failed to mention that I'm using Adobe Acrobat Pro DC on a Windows 10 PC.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2018 Oct 11, 2018

Check your Drafts folder...

On 10 October 2018 at 18:52, jeraldf7147659 <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 11, 2018 Oct 11, 2018
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines