0

I want to embed a PDF into an an email I am generating with CFMAIL. I am trying this but the email just shows nothing:

<cfhttp 
  url="https://jaydien.ezservicetrax.com/lifeback/docs/form1.pdf"
  getasbinary="auto"
  method="get" 
  result="urlContent"
>
</cfhttp>

Can anyone assist?

rrk
  • 15,677
  • 4
  • 29
  • 45
Brian Fleishman
  • 1,237
  • 3
  • 21
  • 43

1 Answers1

1

This is a limitation of EMAIL, not of ColdFusion (<cfmail>).

An email is either plain text or HTML

You might have seen this video showing how to embed a PDF into an email in Outlook:

https://www.youtube.com/watch?v=-0mdeBnmFlI

This option only exists in the Outlook desktop client, not the web UI, because all it's doing in displaying the first page of the PDF as an image in the body of the email. This conversion is done by the client and not possible via a browser.

Another reference to this question from this Adobe forum post from 2014 has more of an explanation. There's even a response from 2020 where someone is asking if there's any update on this and the answer is still

Send it as an attachment.

Adrian J. Moreno
  • 14,350
  • 1
  • 37
  • 44