This content has been marked as final. Show 6 replies
I don't understand what you're confused about.
That FAQ entry doesn't tell you how to download all attachments, it tells you how to download any attachment.
You have to write the code that selects which attachment you want, based on whatever your criteria are.
Are you perhaps asking how to use the Folder.search method?
I have downloaded attachments from my gmail account to local drive by using JavaMailApi.
i will show the message subjects in my webpage.If i click the subject the corresponding attachment will be download.
Here i have two questions,
1)Can i display the attachment files in my page?
2)I want to download the selected file from an attachment.suppose If i have an attachment with 5 files.
and i select the 3rd file then the 3rd file will be download.how can i do it?
1) Yes. How to do that is not a JavaMail problem.
2) Attachments don't have 5 files, but you might have 5 file attachments. If you want the third one, write a loop that finds all the attachments and stop when it finds the third one.
There are some demo programs included with JavaMail that might help you. Have you found them?