Copy link to clipboard
Copied
Hi there! I am trying to create a form that prompts you to submit via email utilizing the Actions > Run Javascript. Is there a way to bcc an email? My current script is below. Any help would be appreciated!
var targetEmail = "email"
var cCCAddr = "email; email"
var subjectLine = "ACTION REQUIRED: Status Change Form for: " + this.getField("LEGALNAME").value+" has been submitted.";
var body = "Status Change Form for: " + this.getField("LEGALNAME").value+" has been submitted by: "+ this.getField("SUPERVISORSIG").value+" on "+this.getField("TODAYSDATE").value+". \n\nPlease advise if approved for payroll processing.";
this.mailDoc({cTo: targetEmail, cCc: cCCAddr, cSubject: subjectLine, cMsg: body});
Thom - Thank you for that resource. I was able to use that to update the script to the below and it worked. Including if it helps others. Much appreciated!!
var targetEmail = "email"
var cCCAddr = "email;email;"
var cBccAddr = "email" + this.getField("SUPERVISOR EMAIL").value;
var subjectLine = "ACTION REQUIRED: Status Change Form for: " + this.getField("LEGAL NAME").value+" has been submitted.";
var body = "Status Change Form for: " + this.getField("LEGAL NAME").value+" has been submitted by: "+ t
...Copy link to clipboard
Copied
See the reference entry:
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/doc.html#maildoc
Read this article:
https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/
Copy link to clipboard
Copied
Thanks, Thom. I looked at those references, but don't understand how to script the Bcc as a novice user. Any chance you know the script?
Copy link to clipboard
Copied
Thom - Thank you for that resource. I was able to use that to update the script to the below and it worked. Including if it helps others. Much appreciated!!
var targetEmail = "email"
var cCCAddr = "email;email;"
var cBccAddr = "email" + this.getField("SUPERVISOR EMAIL").value;
var subjectLine = "ACTION REQUIRED: Status Change Form for: " + this.getField("LEGAL NAME").value+" has been submitted.";
var body = "Status Change Form for: " + this.getField("LEGAL NAME").value+" has been submitted by: "+ this.getField("SUPERVISOR_3").value+" on "+this.getField("TODAYS DATE_af_date").value+".\n\nType of change requested is: "+this.getField("STATUS CHANGE TYPE").value+".\n\n" +this.getField("SUPERVISOR_3").value+" Please advise payroll/HR team if approved for processing.";
this.mailDoc({bUI: true, cTo: targetEmail, cCc: cCCAddr, cBcc: cBccAddr, cSubject: subjectLine, cMsg: body});