How can I implement automail responders using the JavaMail API?

Serge Knystautas

You could create a FolderListener object and listen for new messages, create a new message as a reply, and send it out using the JavaMail API. However, this approach requires you to keep a connection open to your IMAP account at all times, and would not work with a POP account as you can only have one connection at a time with a POP account.

You might want to check out JAMES, an all Java implementation of an SMTP and POP3 server (IMAP coming) that offers a mailet API. Mailets allow you to process incoming mail messages and do tasks such as autorespond to incoming messages.