@Test
    void testSendTwoMessagesSameConnection() throws Exception {
        final MimeMessage[] mimeMessages = new MimeMessage[2];
        final Properties mailProps = this.getMailProperties(smtpServer.getPort());
        final Session session = Session.getInstance(mailProps, null);
        mimeMessages[0] = this.createMessage(session, "sender@whatever.com", "receiver@home.com", "Doodle1", "Bug1");
        mimeMessages[1] = this.createMessage(session, "sender@whatever.com", "receiver@home.com", "Doodle2", "Bug2");
        final Transport transport = session.getTransport("smtp");
        transport.connect("localhost", smtpServer.getPort(), null, null);

        for (final MimeMessage mimeMessage : mimeMessages) {
            transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
        }

        transport.close();

        assertEquals(2, storingMessageListener.getMessages().size());
    }
See
<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1474700&amp;group_id=78413&amp;atid=553186">...</a>
for discussion about this bug

@throws IOException        on IO error
@throws MessagingException on messaging error
src/test/java/de/gessnerfl/fakesmtp/smtp/SmtpComplianceIntegrationTest.java