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 f5b5933..66d5d41 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 @@ -110,7 +110,7 @@ class MailReader( if (attachmentsWithEInvoice.isNotEmpty()) { return MailWithInvoice( - message.from.joinToString(), message.subject, + message.from?.joinToString(), message.subject, message.sentDate?.let { map(it) }, map(message.receivedDate), message.messageNumber, 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 3f56b39..2c60112 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 @@ -4,7 +4,7 @@ import java.time.Instant import java.time.ZoneId class MailWithInvoice( - val sender: String, + val sender: String?, val subject: String, val sent: Instant?, val received: Instant,