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

How can I display a pdf in an email not as an attachment but as an image while making use of a submit by Email button?

New Here ,
Sep 25, 2018 Sep 25, 2018

I'm making use of a Email button/javascript which generates an automatic email where the pdf is included as an attachment (Outlook).

Below is the javascript of the action. It works fine, but the client would like that the PDF-form is immediately visible, instead of having to open it as an attachment.

Any ideas how to adjust the code?

Javascript by Thom Parker

// This is the form return email. It's hardcoded

// so that the form is always returned to the same address.

// Change address on your form to match the code below

var cToAddr = "formsAdmin@BigCorp.com"

// First, get the client CC email address

var cCCAddr = this.getField("ClientEmail").value;

// Now get the beneficiary email only if it is filled out

var cBenAddr = this.getField("BennyEmail").value;

if(cBenAddr != "")

cCCAddr += ";" + cBenAddr;

// Set the subject and body text for the email message

var cSubLine = "Form X-1 returned from client"

var cBody = "Thank you for submitting your form.\n" + "Save the filled form attachment for your own records"

// Send the entire PDF as a file attachment on an email

this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});

TOPICS
PDF forms
1.1K
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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 25, 2018 Sep 25, 2018
LATEST

You can't. It's up to the email application/service to decide how to display an attached file. You can't influence that with a script.

View solution in original post

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
Community Expert ,
Sep 25, 2018 Sep 25, 2018
LATEST

You can't. It's up to the email application/service to decide how to display an attached file. You can't influence that with a script.

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