@Test
public void testParseCreatedHtmlEmailWithMixedContent() throws Exception
{
final Session session = Session.getDefaultInstance(new Properties());
final HtmlEmail email = new HtmlEmail();
email.setMailSession(session);
email.setFrom("test_from@apache.org");
email.setSubject("Test Subject");
email.addTo("test_to@apache.org");
email.setTextMsg("My test message");
email.setHtmlMsg("<p>My HTML message</p>");
email.buildMimeMessage();
final MimeMessage msg = email.getMimeMessage();
final MimeMessageParser mimeMessageParser = new MimeMessageParser(msg);
mimeMessageParser.parse();
assertEquals("Test Subject", mimeMessageParser.getSubject());