Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mail server for JavaMail testing [closed]

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

like image 554
darkrain Avatar asked Jun 23 '09 14:06

darkrain


People also ask

How can I get SMTP server response using JavaMail?

SMTPTransport t = (SMTPTransport)session. getTransport("smtps"); t. send(message); String response = t. getLastServerResponse(); boolean s = t.

What is GreenMail server?

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. Supports SMTP, POP3 and IMAP including SSL. Prevents accidental email leaking to real mail servers.


1 Answers

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.

like image 200
Marcin Zajączkowski Avatar answered Sep 21 '22 03:09

Marcin Zajączkowski