"from@example.com", "replyTo@example.com", "Subject", null,
HOST, PORT, null, null, "false", "3", null, null, "true");
appender.start();
final LoggerContext context = (LoggerContext) LogManager.getContext();
final Logger root = context.getLogger("SMTPAppenderTest");
root.addAppender(appender);
root.setAdditive(false);
root.setLevel(Level.DEBUG);
final SimpleSmtpServer server = SimpleSmtpServer.start(PORTNUM);
root.debug("Debug message #1");
root.debug("Debug message #2");
root.debug("Debug message #3");
root.debug("Debug message #4");
root.error("Error with exception", new RuntimeException(
"Exception message"));
root.error("Error message #2");
server.stop();
assertTrue(server.getReceivedEmailSize() == 2);
final Iterator<SmtpMessage> messages = server.getReceivedEmail();
final SmtpMessage email = messages.next();