The JavaMail reference implementation from Sun includes protocol providers in subpackages of com.sun.mail. Note that the APIs to these protocol providers are not part of the standard JavaMail API. Portable programs will not use these APIs.
Nonportable programs may use the APIs of the Sun protocol providers by (for example) casting a returned Folder object to a com.sun.mail.imap.IMAPFolder object. Similarly for Store and Message objects returned from the standard JavaMail APIs.
The Sun protocol providers also support properties that are specific to those providers. The package documentation for the {@link com.sun.mail.imap IMAP}, {@link com.sun.mail.pop3 POP3}, and {@link com.sun.mail.smtp SMTP} packages provide details. ...展开收缩