Sun has released JavaMail 1.4.2. JavaMail is a basic library for performing POP, SMTP, and IMAP. I wrote about this in the final chapter of Java Network Programming. Accoording to Bill Shannon:
The 1.4.2 release contains several bug fixes, performance improvements, and enhancements, including the following significant changes:
- Improvements to InternetAddress parsing. By setting the System property "mail.mime.address.strict" to "false", no addresses in mail messages will cause parsing errors.
- "Be liberal in what you accept." In addition to the above, several other System properties can be set to allow JavaMail to accept bogus messages of various types.
- Significant rewrite of IMAP locking to avoid deadlocks.
- Significant rewrite of IMAP message cache to delay creating IMAPMessage objects until needed. This significantly reduces memory consumption with very large IMAP mailboxes.
- The JavaMail DSN support now also supports parsing Message Delivery Notifications.
- Simplified SSL support. It's now even easier to enable SSL support in JavaMail. Instead of using the SSL protocol names, you can simply set the mail.<protocol>.ssl.enable property. This means you don't have to remember to (for example) change the property "mail.smtp.host" to "mail.smtps.host", instead you can continue to set "mail.smtp.host" and also set "mail.smtp.ssl.enable" to "true" to enable use of SMTP over SSL.
- RFC 2595 server identity check. Enable the server identity checks specified in RFC 2595 to prevent man in the middle attacks by setting the property "mail.<protocol>.ssl.checkserveridentity" to "true".
Java 1.4 or later is required.