GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes.
Typical use cases include mail integration testing or a lightweight sand boxed mail server for development. GreenMail is the first and only library that offers a test framework for both receiving and retrieving emails from Java.