If I construct a user flag by passing a String to the Flags constructor, and then call message.setFlags(userFlag, true), message.getFlags().contains(userFlagString) is returning false. What's up?
John Zukowski According to Bill Shannon, the primary JavaMail engineer at Sun, this is apprarently a bug. Instead of passing the string to the constructor, he suggests the following as a workaround:
Flags flags = new Flags(); flags.add(userFlagString); message.setFlags(flags, true);