java.lang.Object | +-javax.mail.Folder | +-com.sun.mail.pop3.POP3Folder getUID public java.lang.String getUID(Message msg) throws MessagingExceptionReturn the unique ID string for this message, or null if not available. Uses the POP3 UIDL command. Returns: unique ID string Throws: MessagingException -
每次访问时候,将邮件和已读邮件列表比较,判断是否为新邮件.
即使我在本地建了一个已下载邮件,但我如果不能在服务器上做个记号(已下载),下次我去取信时还是不知道该不该取。如果有一个标识来标识是否取过当然很容易了,但一个Message好像没有一个ID来标识它呀,你说的getUID()是那个类的方法?Message和Folder都没有这个方法呀。
java.lang.Object
|
+-javax.mail.Folder
|
+-com.sun.mail.pop3.POP3Folder
getUID
public java.lang.String getUID(Message msg)
throws MessagingExceptionReturn the unique ID string for this message, or null if not available. Uses the POP3 UIDL command.
Returns:
unique ID string
Throws:
MessagingException -