Does JavaMail support server-push?
问题 Does JavaMail support notification of new emails through server-push? If yes, where is the documentation for that? If no, is there a library that can do it? 回答1: You should be using IMAPFolder's idle function to issue the idle command to the server. That will then listen for events, such as a new mail or deleted mail. (See the IMAP spec to see what the messages look like). And you should be using a MessageCountListener to execute code when a number of emails in the mailbox change. IMAP's idle