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 d4012a9..8237be3 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 @@ -111,6 +111,7 @@ class MailReader( return MailWithInvoice( message.from?.joinToString(), message.subject ?: "", message.sentDate?.let { map(it) }, map(message.receivedDate), message.messageNumber, + parts.any { it.mediaType == "application/pgp-encrypted" }, getPlainTextBody(parts), getHtmlBody(parts), attachmentsWithEInvoice ) diff --git a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt index f74781c..6c85a64 100644 --- a/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt +++ b/e-invoicing-domain/src/main/kotlin/net/codinux/invoicing/mail/MailWithInvoice.kt @@ -16,6 +16,7 @@ class MailWithInvoice( * -> use with care. Message numbers are not valid / the same anymore after expunge. */ val messageNumber: Int, + val isEncrypted: Boolean = false, val plainTextBody: String?, val htmlBody: String?, val attachmentsWithEInvoice: List