• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting flags in javax.mail package .

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When a mail is read from the mailbox using
message.getContent() method,the flag(ie.SEEN)was set to true as
message.setFlag(Flags.flag.SEEN,true);
then the folder is closed.
When i return to the folder again the flag on the read message is found to be false.It is not getting set in the saved folder.
So how can I set the flag to true permanently.
Please reply urgently.
thanks
vikas tarade.
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If using the Sun POP3 provider, then a message's permanent flags (such as SEEN/RECENT) cannot be set. You can have a look at the sundocs supplied in the JavaMail api to see the exact details of the POP3 implementation.
Alternatively, you coulddo a message.saveChanges() to commit the changes
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i opened the folder in Folder.Read_Write mode,then i do msgs[i].saveChanges(), but i met problem and the error message is : javax.mail.IllegalWriteException OP3 Messages are read-only. what could i do to make the change permanent ?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic