Solved

Is there a way in JavaMail to get only messages that have an Attachment?

Posted on 2010-11-28
5
411 Views
Last Modified: 2013-11-19
Hey I am new to JavaMail and have an issue that I only want to fetch emails that have an attachment. Is there a way to do that without having to download and parse the parts to all new messages? (for POP3 and IMAP)?
0
Comment
Question by:amirsky
  • 4
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34225351
0
 

Author Comment

by:amirsky
ID: 34225372
Interesting, but is having a type 'multipart/*' and a part count > 0 really a garuntee that there are FILE attachments? Couldn't there just be more than one INLINE text or such?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34225374
Yes, that could easily be too naive. You might need to perform further tests
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 34225384
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34225586
:)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Are you irritated by repeating emails issue in Microsoft Outlook 2016 after recent update ?  Lets’ see how to resolve and prevent duplicate emails in the Outlook 2016 using some simple techniques.
The viewer will learn how to count occurrences of each item in an array.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question