private MimeMessage createMessage(final Session session,
                                      final String from,
                                      final String to,
                                      final String subject,
                                      final String body) throws MessagingException {
        final MimeMessage msg = new MimeMessage(session);
        msg.setFrom(new InternetAddress(from));
        msg.setSubject(subject);
        msg.setSentDate(new Date());
        msg.setText(body);
        msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
        return msg;
    }
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