GH-3451: Use GreenMail for testing instead

Fixes https://github.com/spring-projects/spring-integration/issues/3451

The GreenMail provides a comprehensive support for e-mail scenarios
testing.

* Use GreenMail instead our own `TestMailServer` for better and broader
support
* Convert SmtpTests and Pop3Tests to GreenMail
* Document that Pop3MailReceiver does not support autoCloseFolder=false
* Pop3MailReceiver uses `folder.getMessageCount()` to determine if there
are new messages.
This count only gets updated when opening the folder.
* Use GreenMail for remaining mail tests
* convert MailTests and ImapMailReceiverTests to GreenMail
* remove duplicate mail dependencies
* route com.sun.mail logging to log4j (via jul and slf4j)
This commit is contained in:
Alexander Pinske
2021-04-09 16:47:25 -04:00
committed by Artem Bilan
parent 13005dfdcd
commit 996daca228
9 changed files with 223 additions and 140 deletions

View File

@@ -48,7 +48,10 @@ import org.springframework.util.Base64Utils;
*
* @since 5.0
*
* @deprecated since 5.5 in favor of GreenMail library for mail testing.
*
*/
@Deprecated
public final class TestMailServer {
public static SmtpServer smtp(int port) {