What is the difference between IMAPMessage.getUID() and Message-ID header?
问题 What is the difference between these two from java mail perspective? I can see that 2 values are not same for a particular message. So what should I consider an IMAP message's unique id? If I need to fetch message from an IMAP server corresponding to an unique id, should I use? MessageIDTerm or IMAPFolder.getMessageByUID() 回答1: UID is the unique identification number of a email in a IMAP folder . Each mail in a folder is assigned a uid, it is you can say a index maintained by the mail folder.