Other PDF Issues

How to Email a PDF Using the Email Address from a Digital Signature

Camila MilosovichCamila Milosovich Nov 5, 2026 869 views

Question details

The user needs to extract the email address associated with a digital signature in a PDF and use it to automatically send the completed document.

How to Email a PDF Using the Email Address from a Digital Signature
Product
PDF Editor
Device & OS
not provided
Scenario
Automating a PDF workflow to send a signed document back to the original signer.
Observed behavior
Using Acrobat JavaScript to pull the signer's identity metadata, lock the form fields, and route the PDF via email.
Before you start

Ensure that the document has an existing digital signature field and that the signer's digital ID certificate contains a valid email address before running the script.

Solution 1Recommended

Extract Email via JavaScript and Use mailDoc

Use the signatureInfo() method in your PDF JavaScript environment to parse the signer's email address and route the document.

By utilizing the PDF JavaScript API, you can programmatically read the metadata of a digital signature once it is applied. The signer's identity string usually contains their email address formatted within angle brackets.

You can use a regular expression to target and extract just the email address, which can then be passed to the mailDoc() function to automatically draft an email.

1
Identify the Signature Field

Determine the exact name of the digital signature field in your PDF form (for example, 'SignatureFieldName').

2
Retrieve Signature Information

Use the script this.getField('SignatureFieldName').signatureInfo().name to pull the identity string of the signer.

3
Extract the Email Address

Apply a regular expression to parse the email address from the identity string. You can append .match(/<(.+)>$/)[1] to the previous script to isolate the email.

4
Send the Document

Pass the extracted email address variable into the app.mailDoc() function as the recipient parameter to automatically draft and send the email with the PDF attached.

Extract Email via JavaScript and Use mailDoc
Metadata Requirement: This method relies on the signer's digital certificate actually containing their email address within the standard format. If the certificate lacks an email, the script will return an error.
Free Microsoft Office alternative

Manage and Sign PDFs Easily with WPS Office

While advanced JavaScript routing is specific to certain PDF editing APIs, WPS Office provides a lightweight, highly compatible, and free alternative for signing, editing, and managing your PDF documents effortlessly.

Fully compatible with standard PDF formats, Microsoft Word, Excel, and PowerPoint files.Easily add, manage, and verify digital signatures without needing complex JavaScript code.Lightweight software that opens and processes large PDF documents seamlessly.A complete, free alternative to Adobe Acrobat and Microsoft Office for daily document tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why is the JavaScript returning an error when extracting the email?

The script will fail if the digital signature has not been applied yet, if the field name does not match, or if the signer's digital ID does not include an email address in the expected <email@domain.com> format.

Can I use this JavaScript code in any PDF viewer?

No, this specific JavaScript method relies on advanced PDF scripting APIs (like Acrobat JavaScript). Basic PDF readers may not support the signatureInfo() method or the mailDoc action.

How do I lock fields after the PDF is signed?

Instead of manual scripting, you can typically configure the digital signature field properties in your PDF editor to automatically mark specific fields (or all fields) as read-only once the signature is placed.