Copy link to clipboard
Copied
Hello. How do I email a pdf that generates dynamically? I have it displaying on the screen based on data it pulls but now I want to take that actual document and send it automatically with cfmail.
Thanks,
Andy
Copy link to clipboard
Copied
Use the functionality of the features you are using to generate the dynamic PDF and write it as a file.
Use the <cfmailparam....> functionality to create an e-mail attachment of that file.
The details of all of that is fairly well covered in the documentation.
Copy link to clipboard
Copied
<cfdocument> can?
Perhaps I should try src and filename.
I was reviewing the tag in livedocs and must have missed it.
Copy link to clipboard
Copied
No, Firstly you can create PDF file and attach that file with mail.
Copy link to clipboard
Copied
Can you give me a little more detail here? I am looking through the forums and livedocs and am not coming up with anything promising. I'll keep looking but a nudge in the right direction could help me out.
Thanks
Copy link to clipboard
Copied
Use cfdocument with the filename attribute to save the PDF to disk and
cfmailparam with the file attribute to read the file from disk and
send it via e-mail.
Mack
Copy link to clipboard
Copied
Yep already figured this one out yesterday. I used filename and then call it later and send as an attachment using cfparam.
Copy link to clipboard
Copied
Captain Stupid here. Sorry to waste time. I was adding src= into the tag when all I needed was filename=.
Working now. Sorry again.