diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt index 2d06fdc..439e2d5 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/email/FetchEmailsStatus.kt @@ -39,8 +39,8 @@ data class FetchEmailsStatus( return part } - (part as? BodyPart)?.parent.let { parent -> - return getMessage(part) + (part as? BodyPart)?.parent?.parent?.let { parent -> + return getMessage(parent) } return null