How to Fix Acrobat JavaScript Email Buttons Not Working
Question details
Users are unable to trigger the JavaScript email button (mailDoc) within a PDF file to send the document.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Attempting to click an embedded JavaScript email button to generate an email with the PDF attached.
- Observed behavior
- The button works on some devices using Acrobat Pro but does nothing on others when opened in Adobe Reader, web browsers, or due to permission and security differences.
Ensure you have a default desktop email client (such as Outlook or Apple Mail) installed and properly configured on your computer, as web-based email services generally cannot be triggered by the PDF mailDoc function.
Ensure the PDF is Opened in a Desktop PDF Application
Web browsers and unsupported third-party PDF viewers often block or do not support Adobe's JavaScript APIs like mailDoc.
Many modern web browsers have built-in PDF viewers that strip out interactive JavaScript for security and performance reasons. To use mailDoc features, the document must be opened in a dedicated desktop application.
Download the PDF to your local hard drive instead of viewing it directly in a web browser window.
Right-click the downloaded PDF file, select 'Open with', and choose Adobe Acrobat Pro, Adobe Acrobat Reader, or another fully featured desktop PDF reader.
Click the email button again to verify if the local application correctly processes the script and opens your email client.

Enable JavaScript in Acrobat Preferences
For security reasons, JavaScript execution might be disabled by default in the user's PDF reader settings.
Configure the Default OS Email Client
The mailDoc function relies entirely on the operating system's default email handler to generate the new message.
Share PDFs via Email Instantly with WPS Office
If complex JavaScript buttons are causing compatibility issues across different devices, WPS Office offers a built-in, seamless way to share PDF forms and documents directly via email without relying on vulnerable scripts.
- 1. Open your PDF: Launch WPS Office and open the PDF document you wish to share.
- 2. Access the Share menu: Click on the 'Share' button located in the top-right corner of the toolbar.
- 3. Select Email: Choose the 'Email' option from the sharing dropdown list.
- 4. Send the document: WPS Office will automatically open your default desktop email client and attach the PDF, ready for you to send.

Frequently Asked Questions
Why does the mailDoc button work in Acrobat Pro but not in Adobe Reader?
Adobe Reader has stricter security sandboxing and feature limitations compared to Acrobat Pro. If the PDF lacks extended usage rights or if security settings in Reader restrict executable scripts, the JavaScript button will be blocked from triggering the email client.
Can I use webmail like Gmail or Yahoo with PDF email buttons?
Generally, PDF JavaScript email buttons require a locally installed desktop email client like Microsoft Outlook or Apple Mail to function. They cannot directly interface with browser-based webmail without specialized third-party configuration or bridging tools.
Is it safe to enable JavaScript in my PDF viewer?
While enabling JavaScript allows interactive features like forms and buttons to work normally, it can also pose security risks if you open malicious files. It is recommended to only enable JavaScript when opening trusted documents from known sources.




