Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
9

How do I add C and Bcc with multiple emails when submitting a form with JavaScript?

Explorer ,
Dec 13, 2023 Dec 13, 2023

I have a form that I am using a javascript to email the whole form to a targetEmail, however, I want to include a Cc and Bcc to multiple email addresses. I would also like to include a secondary text field in the subject line. I've tried different variations to no avail, I'm stuck and not sure what to do. Any and all help is greatly appreciated. The code I'm using is below.

 

var targetEmail = "mail@titan.com";

var subjectLine = this.getField("Requested BY").valueAsString;

var body = "Tango Tank Request\nOrdered By: " + this.getField("Requested BY").valueAsString + " " + "\n" + this.getField("Notes and Comments").valueAsString

this.mailDoc({cTo: targetEmail, cSubject: subjectLine, cMsg: body});

TOPICS
How to , JavaScript , PDF , PDF forms
773
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Dec 13, 2023 Dec 13, 2023

It's all documented in the reference for this method...

 

this.mailDoc({cTo: targetEmail, cSubject: subjectLine, cMsg: body, cCc: "john.doe@gmail", cBcc: "jane.doe@aol.com;me@yahoo.com"});

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2023 Dec 13, 2023

It's all documented in the reference for this method...

 

this.mailDoc({cTo: targetEmail, cSubject: subjectLine, cMsg: body, cCc: "john.doe@gmail", cBcc: "jane.doe@aol.com;me@yahoo.com"});

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 14, 2023 Dec 14, 2023
LATEST

Thank you @try67, You've been a huge help and I do appreciate all of your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines