diff --git a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt index 2f9958f..e375000 100644 --- a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt +++ b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt @@ -119,7 +119,7 @@ class MailReader( private fun getAllMessageParts(part: Part): List { contentClasses.add(part.content?.let { it::class }) - return if (part.content is Multipart) { + return if (part.isMimeType("multipart/*")) { val multipart = part.content as Multipart val parts = IntRange(0, multipart.count - 1).map { multipart.getBodyPart(it) }