Posted: January 29, 2013 13:03 by Mark McLaren
I have been playing with the the experimental Gmail support in JavaMail 1.4.6-SNAPSHOT. I have been having problems using getLabels.
By turning debug on I can see that the X_GM_LABELS are being returned by the Gmail server. I have tracked the problem down to GmailProtocol using IMAPResponse's readSimpleList method to parse the labels string.
As far as I can tell the returned label values are not lists of simple strings. In my local implementation I added a method to IMAPResponse called "readAtomStringList" (code below) and tweaked GmailProtocol to use that instead of readSimpleList.. It seems to work!
It is great to see Gmail support in JavaMail,