Is there a way to retrieve the mail bodies of multiple emails with a single call to an IMAP server using the Javamail API?
I know that I can get to the body of this message using the Message.getContent () call, but this completes the imap server call for each individual message.
Can FetchProfile and Folder.fetch calls be used for bulk extraction bodies? The documentation assumes that FetchProfile is for header data only. I tried the following, but that did not help:
FetchProfile fp = new FetchProfile(); fp.add("rfc822.text"); inbox.fetch(messages, fp);
If this cannot be done using Javamail, is it due to a restriction in the Javamail API, or does IMAP simply not support it?
source share