I follow Aspose document but the mail that be saved is not from test folder. It’s a mail from Inbox instead.
As I print it out, data from ImapMessageInfo seem right. But when I try to fetch message from ImapClient by unique id, the list is all messages from Inbox and I cannot find the way to filter the list.
Could you please advice a way to fix this issue?
Here is my JAVA code:
I have observed your requirements and suggest you to please visit the following thread link for your kind reference. I also like to share that you need to [traverse the mailbox folder wise](https://docs.aspose.com/display/emailjava/Fetching+Messages+and+Saving+to+Disc#FetchingMessagesandSavingtoDisc-ListMessagesfromaFolder) to avoid get the exact folder message.
Thanks for your advice. Actually my code followed these Aspose’s example as your link. Somehow when I run my code again today the previous problem is gone. I’m not sure why.
But I have a new problem. I cannot fetch messages, some of them return null and I got NullPointerException. Same code, I don’t edit anything.
It’s strange that using same code your previous issue is gone and now you are facing other issue of NullPointerException on fetching message. I request you to please provide a working sample project along with test account credentials reproducing the issue so that we may proceed further with investigation on our end.
@mudassir.fayyaz
Here is the sample project as you requested. The zip file is protected, I’ll send the password to your inbox message. sample.zip (22.9 KB)
Thank you for sharing the clarification. An issue with ID EMAILJAVA-34648 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.