Attach a pdf on fly in email after click on submit | Community
Skip to main content
Prince_Shivhare
New Participant
Jan 21, 2018 9:22 AM UTC

Attach a pdf on fly in email after click on submit

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.

5 replies

edubey
Level 10
Jan 21, 2018 3:13 PM UTC

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

Possible to share code snippet?

Translate
Prince_Shivhare
New Participant
Jan 22, 2018 11:27 AM UTC

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.

Translate
smacdonald2008
Level 10
Jan 22, 2018 3:38 PM UTC

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

Translate