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

Insert subject line in existing e-mail javascript

Contributor ,
Dec 07, 2020 Dec 07, 2020

Hello everyone,
I found this beautiful javascript somewhere on the net (unfortunately I can't remember exactly where),

I would like to add a subject to this script.

As a total beginner, I need the help of the specialists here.

How and where do I add a subject to the existing script without changing anything else to the script?

 

allgood();
function allgood()
{
var adr="info@datenschutz-roemer.de";
for (var i=0;i<this.numFields;i++)
{
var fName=this.getNthFieldName(i);
var f=this.getField(fName);
if (f.name == "E-Mail")
{
if(f.value != "")
{
adr=f.value;
}
}
}
if (adr=="")
{
app.alert("Keine E-Mail-Adresse angegeben!");
}
else
{
this.mailDoc({bUI: true, cTo: adr});
}
}

 

Thanks everyone in advance

Nikolaos.

TOPICS
How to , PDF forms , Windows
663
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

correct answers 1 Correct answer

Community Expert , Dec 07, 2020 Dec 07, 2020

Change this line:

this.mailDoc({bUI: true, cTo: adr});

To:

this.mailDoc({bUI: true, cTo: adr, cSubject: "Subject text of the email"});

Translate
Community Expert ,
Dec 07, 2020 Dec 07, 2020

Change this line:

this.mailDoc({bUI: true, cTo: adr});

To:

this.mailDoc({bUI: true, cTo: adr, cSubject: "Subject text of the email"});

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
Contributor ,
Dec 07, 2020 Dec 07, 2020
LATEST

It is what it is ... a dream

That happens when you have your head full ...
Didn't include the c before the subject.
I didn't see the forest for all the trees.

Many thanks

Nikolaos.

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