diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-29 16:43:20 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-29 16:43:20 +0200 |
commit | b390d0e43a803861268d68deefca03b09d6731f3 (patch) | |
tree | 562d1dd422734d01526f5d9bc677abc39f0af806 /framework/src/domain/mime/mimetreeparser/messagepart.cpp | |
parent | 904c8e08fd3c73174a8b4aadbc45a6895600d2cc (diff) | |
download | kube-b390d0e43a803861268d68deefca03b09d6731f3.tar.gz kube-b390d0e43a803861268d68deefca03b09d6731f3.zip |
Fixed apple html messages with attachments.
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/messagepart.cpp')
-rw-r--r-- | framework/src/domain/mime/mimetreeparser/messagepart.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/messagepart.cpp b/framework/src/domain/mime/mimetreeparser/messagepart.cpp index 4bed80da..1a1b2003 100644 --- a/framework/src/domain/mime/mimetreeparser/messagepart.cpp +++ b/framework/src/domain/mime/mimetreeparser/messagepart.cpp | |||
@@ -568,6 +568,17 @@ AlternativeMessagePart::AlternativeMessagePart(ObjectTreeParser *otp, KMime::Con | |||
568 | // immediate children of this multipart/alternative node. | 568 | // immediate children of this multipart/alternative node. |
569 | // In this case, the HTML node is a child of multipart/related. | 569 | // In this case, the HTML node is a child of multipart/related. |
570 | dataHtml = findTypeInDirectChilds(mNode, "multipart/related"); | 570 | dataHtml = findTypeInDirectChilds(mNode, "multipart/related"); |
571 | if (dataHtml) { | ||
572 | const auto parts = dataHtml->contents(); | ||
573 | for (int i = 0; i < parts.size(); i++) { | ||
574 | const auto p = parts.at(i); | ||
575 | if (i == 0 ) { | ||
576 | dataHtml = p; | ||
577 | } else if (KMime::isAttachment(p)) { | ||
578 | appendSubPart(MimeMessagePart::Ptr(new MimeMessagePart(otp, p, true))); | ||
579 | } | ||
580 | } | ||
581 | } | ||
571 | 582 | ||
572 | // Still not found? Stupid apple mail actually puts the attachments inside of the | 583 | // Still not found? Stupid apple mail actually puts the attachments inside of the |
573 | // multipart/alternative, which is wrong. Therefore we also have to look for multipart/mixed | 584 | // multipart/alternative, which is wrong. Therefore we also have to look for multipart/mixed |