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

Javascript to build an e-mail with attachments

Explorer ,
Sep 18, 2023 Sep 18, 2023

I have the following Javascript code: 

this.mailDoc({

cTo: "emailaddress@gmail.com",
cSubject: "Royal con formage",
cMsg: "blablablabla"
});

 

which, applied to a certain button, gives me the opportunity to send a pre-set e-mail. Now, I'd like to improve the code by giving the instruction to pre-attach pdf files from my Drive's folders into the e-mail. My job involves crazy amounts of work, so whenever I can spare even seconds of time, it's a great victory. 

I tried to obtain this result by adding the following string: myEmail.attachDoc(filePath);

But due to what happen to be security conditions, I can't execute the code.

 

I don't believe this to be impossible.

In the past I couldn't copy the values from the text fields of a document and past them into the text fields of another separated document, but I managed to create a Javascript to do it in spite of the previous restrictions and problems.

 

Any help will be greatly appreciated

TOPICS
How to , JavaScript , PDF , PDF forms
196
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
no replies

Have something to add?

Join the conversation