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

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

Explorer ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

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

Views

132

Translate

Translate

Report

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

correct answers 1 Correct answer

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"});

Votes

Translate

Translate
Community Expert ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

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"});

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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