diff --git a/src/main/java/com/mockmock/mail/MockMockMessageHandlerFactory.java b/src/main/java/com/mockmock/mail/MockMockMessageHandlerFactory.java index 62ce824..2ffbb23 100644 --- a/src/main/java/com/mockmock/mail/MockMockMessageHandlerFactory.java +++ b/src/main/java/com/mockmock/mail/MockMockMessageHandlerFactory.java @@ -134,6 +134,14 @@ else if(contentType.matches("text/html.*")) { mockMail.setBodyHtml(convertStreamToString(bodyPart.getInputStream())); } + else if(contentType.contains("multipart")) + { + // Loop if the content type is multipart then get the content that is in that part, + // make it the new container and restart the loop in that part of the message. + multipart = (Multipart)bodyPart.getContent(); + i = -1; + continue; + } } } else if(messageContent instanceof InputStream)