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

Add email and cc from a field

Participant ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

I have a script that takes an email from a field and uses it for the mailto. It also adds to the subject line.

I want the email from a field to now be the CC and the mailto to be in the actual js code, as well as a subjust line which adds a field as well

var cSubline=this.getField("Cost Centre").value + " Please Prepare Translations for " + this.getField("Month").value + this.getField("Date").value + " At " + this.getField("Time").value;

this.mailDoc

({

cTo:this.getField("Province1").value,

cSubject: cSubline

})

So click the button, the email address is filled out, the CC is from a field, the subject line is a field PLUS some text.

Ideas?

TOPICS
PDF forms

Views

7.4K

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
1 ACCEPTED SOLUTION
LEGEND ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

The mailto URI in Acrobat is based on the Web URI. The syntax for the "mailto:" statement is no different.

View solution in original post

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
LEGEND ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

The mailto URL uses named parameters for building the email header and body.

https://yoast.com/dev-blog/guide-mailto-links/

The Full mailto Link Syntax list all of the named parameters and has some HTML examples

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
Participant ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

This is for web, I need for PDF?

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
LEGEND ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

The mailto URI in Acrobat is based on the Web URI. The syntax for the "mailto:" statement is no different.

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
Participant ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

Ok, so I can use this for most of it. thanks. But for the CC, it has to come from a form field the user enters. each form may have a different CC?

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
Enthusiast ,
May 07, 2017 May 07, 2017

Copy link to clipboard

Copied

Check out the following site that can help you generate the mailto JavaScript:

www.fdftoolkit.net/email-pdf-mailto-generator.aspx

Note: Change "NameOfCcField" with the actual name of CC field.

//Place this script in the buttons mouseUp JavaScript event 

//http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf#page=345 

//SUBMIT PDF FORMAT WITH ADOBE READER 

var CC_FIELDNAME = "NameOfCcField";

var url = "mailto:" +  encodeURIComponent(this.getField("Province1").value) + "?subject=" +  encodeURIComponent(this.getField("Cost Centre").value) + " Please Prepare Translations for " +  encodeURIComponent(this.getField("Month").value) + " " +  encodeURIComponent(this.getField("Date").value) + " At " +  encodeURIComponent(this.getField("Time").value) + "&body=See attached file...&cc=" +  encodeURIComponent(this.getField(CC_FIELDNAME).value) + "&bcc="; 

var submitAs = "PDF";//PDF,FDF,XFDF,XDP,XML 

this.submitForm({cURL:url,cSubmitAs:submitAs}); 

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
Participant ,
May 07, 2017 May 07, 2017

Copy link to clipboard

Copied

Perfect, thank you.

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
LEGEND ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

See the maiDoc method in the Acrobat JavaScript API Reference.

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
New Here ,
Nov 13, 2017 Nov 13, 2017

Copy link to clipboard

Copied

Hi all, I am trying to solve a similar issue and any help will be appreciated.

I want the mailto to be always the same email address, but the email from a field to be the CC.

Any ideas?

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
New Here ,
Nov 13, 2017 Nov 13, 2017

Copy link to clipboard

Copied

Basically,

When the user clicks the submit button, I want the PDF form to be attached in the email. And the mailto address is always the same address, but I need the email address from a field to be the CC.

I pretty sure this is possible but I don't have any idea how.

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
Community Expert ,
Nov 13, 2017 Nov 13, 2017

Copy link to clipboard

Copied

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
New Here ,
Nov 14, 2017 Nov 14, 2017

Copy link to clipboard

Copied

LATEST

Thank you, try67. That worked perfectly. Appreciate it.

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