Creating a ToDo from KMail based on an email message stores the attached message (seemingly) as a text file. Trying to open up the attached file in KOrganizer results in opening it in KWrite instead of in KMail. The content itself, however, is sound. If I save the attached file ("Save As...") and then open it up in KMail manually (File -> Open), it does display the message properly (as email message).
STEPS TO REPRODUCE
1. In KMail, right click in message list on a message (or in message view pane), select "Create ToDo", click "Save" button to store it in a calendar of choice.
2. In KOrganizer, select "View" -> "ToDo List" in the menu, find the above created ToDo, double click it, switch to the "Attachments" tab, double click the attached file.
Attached file opens up in KWrite (as text).
Attached file opens up in KMail (as email message).
Linux: LFS-8.4 (Linux From Scratch)
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58
Qt Version: 5.12.3
KMail version: 5.11.1
KOrganizer version: 5.11.1
I tried first asking in the forums (https://forum.kde.org/viewtopic.php?f=215&t=159990) but to no avail. The feature in question has always worked for me perfectly on KDE4. It may very well be that it's just something wrong with my (I guess rather special) distro/set-up, I just can't figure out what and how to fix it. So in case it's just something simple, I wouldn't mind a heads-up. Thanks!
Couldn't reproduce on current master (as of today). I created a Todo from an email, exported it from KOrganizer and checked the iCal file. The attachment has message/rfc882 mime type set as expected.
Thanks a lot for looking into it!
If I may add one more piece of information I hadn't known as of creating this bug report: I tried again a few days ago on current KDE version (KDE Frameworks 5.75, KDE Apps 20.08.2, Plasma 5.20.2) and strangely enough it still doesn't seem to work when using a GMail account BUT it does work as expected on a seznam.cz account through IMAP.
Git commit e7967bea0526e147ce53d45cd2bbcda0894d1685 by Daniel Vrátil.
Committed on 05/11/2020 at 12:17.
Pushed by dvratil into branch 'master'.
Fix attachment mimetype detection
We want to resolve the mimetype from the content only if
QMimeType doesn't now the mimetype or the mimetype is not
valid. This matches the behavior of KMimeType (and this
code) in KDE4.
M +1 -1 src/attachmenticonview.cpp