How do I store messages locally using JavaMail?

John Zukowski

The JavaMail API provides the core interfaces for working with many different types of providers. Sun provides implementations of SMTP and IMAP with the JavaMail implementation and freely offers a POP3 provider separately. In order to use the JavaMail API to provide a local data store for your messages involves just getting another provider. One such provider of a mailbox file is Knife which is distributed under the GNU Lesser General Public Licence. For a list of additional providers see Sun's list at http://java.sun.com/products/javamail/Third_Party.html.