2 Replies Latest reply on Jan 16, 2017 2:30 AM by try67

    Java script to send email not working when using Adobe Reader


      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:






      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});