4 Replies Latest reply on Sep 20, 2011 4:10 AM by try67

    this.mailForm(..) does not work

    roc524

      I have a pdf fillable form on a website.  I am trying to get the JavaScript work with my submit button.  I can successfully use this.submitForm(..) and mailto:..., but I cannot get this.mailForm(..) to work with any combination of parameters.  The ..mailForm(..) script can supposedly allow me to send e-mail without user interaction.  But I can't get it to work in either case.  For example, this.mailForm(true); should allow me to email with user interaction, but when I try using it  with my submit button, nothing happens.  Why?

        • 1. Re: this.mailForm(..) does not work
          gkaiseril MVP & Adobe Community Professional

          Are there any JS console error messages?

           

          Have you read the Acrobat JS API Reference description and notes about the "doc.mailForm()" method?

           

           

          On Windows, the client computer must have its default mail program configured to be MAPI enabled to use this method.

           

          Users with Reader will need to have the a PDF form with special extended Reader rights applied to the PDF.

           

          There are also some special security restrictions that must be addressed.

           

          You might want to look at the 'submit' to script web page method and using the web server script page to process the email action.

           

          1 person found this helpful
          • 2. Re: this.mailForm(..) does not work
            roc524 Level 1

            Are there any JS console error messages?

            No error messages occur.

             

            Have you read the Acrobat JS API Reference description and notes about the "doc.mailForm()" method?

            Yes.  I have tried all combinations of parameters, but "this.mailForm(true);" should work with that one parameter because this.mailDoc

            works without any special reader rights and privileges.


            On Windows, the client computer must have its default mail program configured to be MAPI enabled to use this method.

            But the mailto: and this.mailDoc (with the submit button) work; if they work, isn't the default mail program okay?


            Users with Reader will need to have the a PDF form with special extended Reader rights applied to the PDF.

            Really?  Extended reader rights aren't an option for my client's website.  Maybe I'm out of luck.


            There are also some special security restrictions that must be addressed.
            This is where my knowledge is weak.  this.mailDoc seems to work okay (although it sends only the blank pdf), so shouldn't this.mailForm work also?

             

            You might want to look at the 'submit' to script web page method and using the web server script page to process the email action.

            I am now trying to handle this on the server side, by trying to submit the FDF file up to a folder on the server.  If I could do that, I could use a PHP script to email the FDF file to whoever I want.  Besides the Acrobat JS API Reference, if you can point me to any other reference links, I would appreciate it.

             

            Thanks for your response.

            • 3. Re: this.mailForm(..) does not work
              AdrianEd

              I got the same Problem, so I tried some examples for Mailing the Data, but nothing works in Acrobat.

              Has anyone an idea, why simple methods like "this.mailForm(true);" dont work?

              It's the same with "this.mailDoc(true);".

              Thanks for your help.

              • 4. Re: this.mailForm(..) does not work
                try67 MVP & Adobe Community Professional

                mailForm and mailDoc are not the same. For mailForm you must also specify the list of recipients (in the form of the cTo parameter) if you specify that the GUI should be shown.

                Are you getting any error messages in the JS console? From which context are you running the code?