Is there any way to uniquely identify a Message in a Folder?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, April 25, 2001 10:26 AM

I am attempting to write a set of RMI servers to handle some pieces of JavaMail access for a webmail/hosting service. It is based on IMAP4.

The folders can be uniquely identified by their full name or URLName. (E.g., INBOX.TechMail.jGuru or imap://localhost/INBOX/TechMail/jGuru) However, messages are identified by a folder and message number, but the message number is not guaranteed to be the same between calls--because of newly arrived messages, message deletions, etc.

Is there a Serializable way to identify a message? One that could be passed between Remote stubs that would uniquely identify a Message such as is required for various Folder methods like in copyMessage...

Re: Is there any way to uniquely identify a Message in a Folder?

Posted By:   Anonymous  
Posted On:   Wednesday, April 25, 2001 06:44 PM

After a little more research I found a note at Java Live | December 12, 2000. Here Bill Shannon describes a way to uniquely identify messages in most IMAP or POP3 implementations.

BillS: If you're using IMAP, you can use the UIDFolder interface to get an IMAP unique ID for a message. You'll probably want to read the IMAP spec to understand the semantics of IMAP UIDs. The Folder object you get back when you're using IMAP will implement the UIDFolder interface. If you're using POP3, see the com.sun.mail.pop3 package documentation. Most POP3 servers support the UIDL extension that is somewhat similar to IMAP UIDs, but more limited.
About | Sitemap | Contact