Javamail IMAP search on SUBJECT is not performed

I use javamail to search for imap by topic in Gmail. I use the subjectTerm class to create a searchTerm object and go to the search function. Search works great for objects that are pure alphanumeric. As soon as I put one quote or dash in the search bar, the search fails.

IMAPSSLStore imapSslStore = connectToImap("imap.googlemail.com",993,email,oauthToken,oauthTokenSecret,getAnonymousConsumer(),true); Folder inbox = imapSslStore.getFolder("[Gmail]/All Mail"); inbox.open(Folder.READ_ONLY); SearchTerm sTerm = new SubjectTerm("String with quote and da-sh"); //this fails Message messages[] = inbox.search(sTerm); //no results found ! 

Is there a standard way to avoid the search bar, or is this a limitation to the end of gmail?

+6
java imap javamail gmail-imap
source share
1 answer
+2
source share

All Articles