@Test public void closeAfterBannerTest(TestContext testContext) { this.testContext=testContext; smtpServer.setDialogue("220 example.com ESMTP"); smtpServer.setCloseImmediately(true); testException(); }
@Test public void closeOnConnectTest(TestContext testContext) { this.testContext = testContext; smtpServer.setDialogue(""); smtpServer.setCloseImmediately(true); testException(); }
@Test public void serverUnavailableTest(TestContext testContext) { this.testContext=testContext; smtpServer.setDialogue("400 cannot talk to you right now"); smtpServer.setCloseImmediately(true); testException(); }
@Test public void connectionRefusedTest(TestContext testContext) { this.testContext=testContext; testException(MailClient.createNonShared(vertx, new MailConfig("localhost", 1588))); }
@Test public void stlsMissingTest(TestContext testContext) { this.testContext=testContext; smtpServer.setDialogue("220 example.com ESMTP multiline", "EHLO", "250-example.com\n" + "250-SIZE 48000000\n" + "250 PIPELINING", "MAIL FROM", "250 2.1.0 Ok", "RCPT TO", "250 2.1.5 Ok", "DATA", "354 End data with <CR><LF>.<CR><LF>", "250 2.0.0 Ok: queued as ABCDDEF0123456789", "QUIT", "221 2.0.0 Bye"); smtpServer.setCloseImmediately(false); testException(mailClientTLS()); }