Attach a pdf on fly in email after click on submit | Community
Skip to main content
Prince_Shivhare
Community Advisor
Community Advisor
January 21, 2018

Attach a pdf on fly in email after click on submit

  • January 21, 2018
  • 1 reply
  • 2208 views

Hi Guys,

I have one functionality where I have to click on submit button and generate email with attach a pdf.

- I am able to send the email.

- pdf contains dymanic content which is coming from API.

- this pdf is working fine. only need to attach it in email on fly or saving somewhere. and delete auto after sometime.

please help me in this.

Regards,
Prince Shivhare

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

edubey
Level 10
January 21, 2018

Where are you keeping the pdf when once it has been populated with dynamic content?

Possible to share code snippet?

Prince_Shivhare
Community Advisor
Community Advisor
January 22, 2018

Hi Praveen,

we are able to generate the pdf. and able to attach it.

so its not necessary to do on fly. we can also save it for temp basis in crx and then delete.

for now we have kept one pdf in crx dam and attaching it. now our challenge is to save a pdf in dam dynamically. and delete after sometime.

and I have one more question here i.e if I will save it. will it create a rendition of it? because if pdf having 5 page. then it creates a 5 rendition. and we have to show original one.

smacdonald2008
Level 10
January 22, 2018

Prince - why not create Java EMAIL API to send an email and then attach the PDF as an attachment.

JavaMail API - Sending Email With Attachment