Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit e9826c36 authored by Volker Krause's avatar Volker Krause

Probe attachment mimetypes ourselves when there's doubt

When encountering attachments without a proper mimetype, let's see if we
can find something better. This helps for example with airline booking
confirmation emails with iCal attachments, many have those but all samples
I have mark them as application/octet-stream, making them inaccessible for

Now we give the corresponding plugins a chance to process these cases too.

Reviewers: knauss

Reviewed By: knauss

Subscribers: knauss, #kde_pim

Tags: #kde_pim

Differential Revision:
parent d0258f10
......@@ -262,6 +262,12 @@ MessagePart::Ptr ObjectTreeParser::parseObjectTreeInternal(KMime::Content *node,
if (node->contentType(false) && !node->contentType()->mimeType().isEmpty()) {
mimeType = node->contentType()->mimeType();
// unfortunately there's many emails where we can't trust the attachment mimetype
// so try to see if we can find something better
if (mimeType == "application/octet-stream") {
mimeType = node->contentType()->mimeType();
const auto mp = processType(node, processResult, mimeType);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment