Mail server for JavaMail testing

darkrain picture darkrain · Jun 23, 2009 · Viewed 22.5k times · Source

I want to test JavaMail locally, so I need a mail server. Are there any free mail servers I can use?

Answer

Marcin Zajączkowski picture Marcin Zajączkowski · Feb 1, 2011

There is also very simple in use GreenMail which was designed as a mail server for automatic unit (self-integration?) tests.

From projects web page (maybe there are some others tools with that functionality nowadays):

GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes. Supports SMTP, POP3, IMAP with SSL socket support. GreenMail also provides a JBoss GreenMail Service.

GreenMail is the fist and only library that offers a test framework for both receiving and retrieving emails from Java.