Insert subject line in existing e-mail javascript

Participant ,
Dec 07, 2020

Copy link to clipboard

Copied

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

Views

53

Likes

Translate

Translate

Report

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

1 Correct Answer

Most Valuable Participant , Dec 07, 2020
try67 Most Valuable Participant , 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"});

Likes

Translate

Translate
Jump to answer Jump to answer
Most Valuable Participant ,
Dec 07, 2020

Copy link to clipboard

Copied

Change this line:

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

To:

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nikolaos. AUTHOR LATEST
Participant ,
Dec 07, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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