SubEthaSMTP is an easy to understand Java library that provides a receptive SMTP server component. By plugging this component into your Java application, you can easily receive SMTP mail using a simple abstract Java interface. Also included is a small sub-project called Wiser, an easy to use incoming mail testing framework.
GreenMail is a suite of email servers for testing purposes and sandbox development. It supports SMTP, POP3, and IMAP (including SSL) and can be embedded into any Java application or unit test. The GreenMail Service (SAR) extension runs as a JBoss embedded developer mail server sandbox, manageable via JMX.
jSieve is a Java implementation of the Sieve mail filtering language defined by RFC 3028. Sieve is an extensible mail filtering language. Its limited expressiveness (no loops or variables and no tests with side effects) allows user created scripts to be run safely on email servers. Sieve is targeted at the final delivery phase (where an incoming email is transferred to a user's mailbox). jSieve is implemented as a language processor that can be plugged into any Internet mail application to add Sieve support.