Skip to main content
Participating Frequently
July 7, 2025
Answered

Help: mail.Doc working on Reader and Pro DC but not browsers

  • July 7, 2025
  • 1 reply
  • 146 views

Hello!

 

I have a pdf that uses a "Click to Email" button utilizing a mail.Doc code to send the form to my office's email inbox. The code works as intended when the document is opened in Acrobat Pro DC or Acrobat Reader, however, when the user opens the pdf in a browser (Chrome, Edge, Firefox) the code works 90% as intended, as the email doesn't have the file attached, and the Bcc address is put into the Cc section as "&bcc=email2@emailaddress.com".  Is there a way to get the pdf to attach to the email using the browser as some clients may not have acrobat on their machines?

 

Code pasted below:

 

var cClientNames = this.getField("Client Name").value;
var cDate = this.getField("Date").value;
var cToAddr = "email1@emailaddress.com";
var cBCCAddr = "email2@emailaddress.com"";
var cHeader = "Hello,";
var cBody = cHeader + "\n\nPlease find the Separation Checklist for " + cClientNames + ", as completed on " + cDate + ", attached to this email." + "\n\nThank You,\n" + cClientNames;
var cSubLine = cClientNames + " - Separation Checklist";
this.mailDoc({bUI: true, cTo: cToAddr, cBcc: cBCCAddr, cSubject: cSubLine, cMsg: cBody});

 

Correct answer try67

PDF plugins in browsers usually have very poor support of scripts. There's nothing we can do about that. Report the issue to the developers of these plugins and inform your users to open the file in Reader, if they want it to work properly.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 7, 2025

PDF plugins in browsers usually have very poor support of scripts. There's nothing we can do about that. Report the issue to the developers of these plugins and inform your users to open the file in Reader, if they want it to work properly.