Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Attach a pdf on fly in email after click on submit

Avatar

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile
Prince_Shivhare
Level 7

21-01-2018

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

Replies

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

21-01-2018

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

Possible to share code snippet?

Avatar

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile
Prince_Shivhare
Level 7

22-01-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.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

22-01-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

Avatar

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 1
Level 7
Prince_Shivhare
Level 7

Likes

95 likes

Total Posts

377 posts

Correct Reply

60 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 50
View profile
Prince_Shivhare
Level 7

22-01-2018

Scott - code related to mail was already written by some other person. who is using MultiPart.

well I am able to send email and also in click on submit, I am able to save the attachment in dam folder.

and also able to send manually uploaded attachment with static path.

now only action required from my side is to attach the same pdf which will be downloaded in submit button. i.e dynamically getting the pdf. and then delete after sometime.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

22-01-2018

If that is an issue - look at writing the new service  that uses Java Email API and then have it attach the file.