How to do a IMAP UID SEARCH with JavaMail?
-
05-07-2023 - |
Pergunta
I am using JavaMail 1.5.1 and i want to do a UID SEARCH
. Is this supported or do i have to issue a low level IMAP command via ((IMAPFolder) folder).doCommand(...)
?
Solução
Outras dicas
According with the docs, this is the way:
Folder f = store.getFolder("INBOX");
UIDFolder uf = (UIDFolder)f;
Message msg = uf.getMessageByUID(uid);
You can find more here: https://javamail.java.net/nonav/docs/api/javax/mail/UIDFolder.html
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow