In our application, we have different users. Each user will register his own email account to fetch emails through IMAP.
Currently the requirement is to search emails across all registered user email accounts, if any one of the users searches.
For example, when user1 wants to view '[email protected]' related emails, emails from user2, user3 etc, will also be fetched and shown to user1, same with other users too.
We can fetch emails one after another and merge all before showing to end-user, but it is very time consuming. Is there any other optimistic method to search across all mail accounts in IMAP Java?
Note: All users are related to each other and they all agreed to share each other mailbox.