Filtering Message based on attachment extension
Hi All,
I have task to develop a java based email client (POP3, IMAP and SMTP based) which only allows email with attachment with certain extension to be downloaded by clients. I develop it with javamail API.
So far my implementation for IMAP is to retrieve all unread/new messages and then check its attachments. All Messages that do not have attachment with intended file extension are discarded and my email client will only present those with intended file extension attachment.
Is there a more efficient way of doing this? can we, for example query the IMAP server by using certain search term so that we only retrieve messages with intended file extension? How about POP3?
Thank you

