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

Java script to send email not working when using Adobe Reader

New Here ,
Jan 15, 2017 Jan 15, 2017

Hope someone can help with my issue. I have a simple script attached to a button that I created using Adobe Pro DC. The Submit button has a script that sends the form to an email address specified in one of the forms fields (field is called ClientEmail). It all works fine in Adobe Pro DC but when I try and run the form in Adobe Reader XI, the following error pops up in the Java Script Debugger box when clicking on the Submit button:

=======

JAVA SCRIPT DEBUGGER

Acrobat EScript Built-in Functions Version 11.0

Acrobat SOAP 11.0

GeneralError: Operation failed.

Doc.mailDoc:20:Field Submit:Mouse Up

========

This is the Java Script I have attached to the submit button:

Action = Mouse Up

Select Action = Run a JavaScript

The script is as follows:

var cToAddr = this.getField("ClientEmail").value;

var cSubLine = "This is the subject line - test"

var cBody = "Test message body."

this.mailDoc({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});

TOPICS
Acrobat SDK and JavaScript
641
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 ,
Jan 16, 2017 Jan 16, 2017

Did you check the Quick Bar info for document.mailDoc? Most methods don't work in Reader so you must check each you use.

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 ,
Jan 16, 2017 Jan 16, 2017
LATEST

This is not a permissions issue. You don't need any special permissions to use this method in Reader XI (in earlier versions you would need the Save Rights applied to the file, but not in XI). So it's probably something else. My guess would be that either there isn't an email client set up in the application, or the email address you're trying to send it to is invalid.

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