From 6b82636fdd5cf9d8da7fa084d6f32a1780e8de5e Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 21 Nov 2024 20:27:05 +0100 Subject: [PATCH] Fixed not reading all parts' content --- .../src/main/kotlin/net/codinux/invoicing/mail/MailReader.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }