File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes JavaMail Flags, IMAP and Gmail Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail Flags, IMAP and Gmail Problem " Watch "JavaMail Flags, IMAP and Gmail Problem " New topic
Author

JavaMail Flags, IMAP and Gmail Problem

Mohammad Abadi
Greenhorn

Joined: Dec 26, 2006
Posts: 4
Hi,

I am trying to get all UNREAD emails from the 'sent mail' folder in my gmail account.
The problem is Gmail automatically set all the sent item flag to 'Flag.SEEN'. Whenever I try to retrieve only the messages that have not been seen yet, nothing is returned because I am searching the folder only for messages that have not been seen.
I tried to flag (Flag.FLAGGED) each message I read, but gmail DELETES all the messages I flagged.

Any suggestions?



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
How could a sent email possibly be unseen?


Ping & DNS - updated with new look and Ping home screen widget
Mohammad Abadi
Greenhorn

Joined: Dec 26, 2006
Posts: 4
Ulf Dittmer wrote:How could a sent email possibly be unseen?


This is what I am trying to say, all the sent items are 'seen' but is there any other flag or method to only retrieve the messages from 'sent mail' folder that have not been read by the application?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail Flags, IMAP and Gmail Problem
 
Similar Threads
great job - frederic
Is there any other alternate to find file size and restrict it?
pop3 problems on large mailboxes
JavaMail IMAP And GMail Unread Messages
JavaMail :: Accessing Gmail using POP3, SSL