Concatenating body parts
This commit is contained in:
parent
85c392e1b7
commit
fbfeb7ced6
|
@ -213,9 +213,8 @@ class MailReader(
|
||||||
} else if (partsForMediaTypeWithoutFilename.isEmpty()) {
|
} else if (partsForMediaTypeWithoutFilename.isEmpty()) {
|
||||||
log.warn { "Multiple message parts with media type '$mediaType' found, but all have a filename" }
|
log.warn { "Multiple message parts with media type '$mediaType' found, but all have a filename" }
|
||||||
null
|
null
|
||||||
} else {
|
} else { // if there are multiple parts without filename, then the second one is in most cases quoted previous message(s)
|
||||||
log.warn { "Multiple message parts with media type '$mediaType' found, but more than one does not have a filename" }
|
partsForMediaTypeWithoutFilename.mapNotNull { it.part.content as? String }.joinToString("\r\n")
|
||||||
partsForMediaTypeWithoutFilename.first().part.content as? String
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
|
Loading…
Reference in New Issue