PDF Editing Issues

How to Add Multiple CC Addresses in Acrobat PDF JavaScript

Phi Hung VoPhi Hung Vo Nov 3, 2026 868 views

Question details

The user wants to configure the mailDoc JavaScript function in a PDF to draft an email with multiple recipients in both the To and CC fields.

Product
Adobe Acrobat PDF
Device & OS
not provided
Scenario
Writing or troubleshooting PDF JavaScript to automatically trigger an email to several contacts simultaneously.
Observed behavior
To execute the mailDoc function successfully, multiple email addresses must be formatted precisely without invalid separator characters like spaces or parentheses.
Before you start

Ensure you have access to edit the interactive form fields or JavaScript properties of your PDF document, and verify that your default desktop email client is correctly configured.

Solution 1Recommended

Format mailDoc Parameters with Semicolons

Correctly structure the JavaScript parameters by enclosing semicolon-separated email addresses in a single set of quotation marks.

When using the mailDoc function in Acrobat PDF JavaScript, exact formatting is critical. The script will fail if commas, spaces, or parentheses are used incorrectly to separate recipients.

1
Open JavaScript editor

Open the PDF document in your PDF editor, navigate to the interactive element (such as a submit button), and open its Properties. Go to the Actions tab and select 'Run a JavaScript'.

2
Group email addresses

Place all intended email addresses for a specific parameter (like cTo or cCc) within a single set of quotation marks. Do not use parentheses.

3
Separate with semicolons

Separate each email address using a semicolon without any spaces after the semicolon (e.g., "user1@domain.com;user2@domain.com").

4
Configure the bUI parameter

Set the bUI parameter to true while troubleshooting so that the application displays the email client's dialog box. If set to false, the cTo parameter becomes strictly required for the email to generate silently.

Format mailDoc Parameters with Semicolons
Correct mailDoc Syntax: Example script: this.mailDoc({ bUI: true, cTo: "contact1@xyz.com;contact2@xyz.com", cCc: "cc1@xyz.com;cc2@xyz.com", cSubject: "Form Submission" });

Create and Manage Interactive PDFs with WPS Office

WPS Office features a robust PDF editor that simplifies managing interactive PDF elements, editing text, and streamlining document workflows without the need for complex programming.

  1. 1. Download and install: Get WPS Office from the official website and install it on your device.
  2. 2. Open your PDF: Launch WPS PDF and open the document you wish to edit or manage.
  3. 3. Edit and configure: Use the 'Form' tab to add interactive form fields, or navigate to the 'Edit' tab to seamlessly modify PDF text, links, and images.
Easily create, fill, and manage interactive PDF forms.Fully compatible with standard PDF formats and structures.Lightweight application with an intuitive, user-friendly editing interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is the mailDoc function failing to open my email client?

This can occur if your operating system does not have a designated default email client, or if the bUI parameter in your script is set to false without providing a valid email address in the cTo parameter.

Can I use spaces after the semicolons in the email list?

No, it is highly recommended to format the addresses without spaces after the semicolons (e.g., "email1@test.com;email2@test.com") to prevent parsing errors in various email clients.

Are the cTo and cCc parameters strictly required?

According to the JavaScript for Acrobat API Reference, if the bUI parameter is set to false, the cTo parameter is absolutely required. The cCc, cBcc, cSubject, and cMsg parameters are always optional.