Bug 515470

Summary: Kontact/Kmail doesn't render some plain text e-mails
Product: [Applications] kontact Reporter: Shawn W Dunn <sfalken>
Component: mailAssignee: kdepim bugs <pim-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, kdedev, montel
Priority: NOR    
Version First Reported In: 6.6.1   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kontact Window, showing unrendered E-mail and "No HTML Message" sidebar
"New Window" view of same e-mail
Kmail "Source" of e-mail

Description Shawn W Dunn 2026-02-03 17:43:45 UTC
Created attachment 189191 [details]
Kontact Window, showing unrendered E-mail and "No HTML Message" sidebar

SUMMARY
In Kontact, some plain text e-mails are not rendering, and the HTML/Plaintext sidebar on the pane is just displaying "No HTML Message"

STEPS TO REPRODUCE
1. Open Kontact Flatpak
2. Select plaintext e-mail

OBSERVED RESULT
Kontact/Kmail does not show any text in the preview pane, nor does it, if you double click the e-mail to open in a new window

EXPECTED RESULT
Preview Pane or New Window displays text of E-mail

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Kinoite 44 20260203
KDE Plasma Version: 6.5.91
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Flatpak Information: Fedora 43 Flatpak Runtime (Kontact Flatpak is from Fedora Flatpaks)

ADDITIONAL INFORMATION
Comment 1 Shawn W Dunn 2026-02-03 17:44:53 UTC
Created attachment 189192 [details]
"New Window" view of same e-mail
Comment 2 Shawn W Dunn 2026-02-03 17:47:58 UTC
Created attachment 189193 [details]
Kmail "Source" of e-mail
Comment 3 Albert Astals Cid 2026-02-03 23:04:44 UTC
I wonder if we are giving up because it's too long?

If i try to forward the email as inline, it knows there's text (it will take a long time to open the window, defenitely something to improve too).
Comment 4 Laurent Montel 2026-02-04 07:33:41 UTC
I will look at it.
Comment 5 Laurent Montel 2026-02-04 12:22:12 UTC
Git commit 9290e745102049bd3d9908cf94cd995765550c15 by Laurent Montel.
Committed on 04/02/2026 at 12:20.
Pushed by mlaurent into branch 'master'.

Fix bug 515470:  Kontact/Kmail doesn't render some plain text e-mails

setContent is limited to 2Mo (from doc) but it seems not be the case.
Or text is converted in setContent and it takes more that 2Mo

I reduce size => now it can be displayed.

M  +4    -2    messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp

https://invent.kde.org/pim/messagelib/-/commit/9290e745102049bd3d9908cf94cd995765550c15
Comment 6 Laurent Montel 2026-02-04 12:23:07 UTC
Git commit 1fcd9e609e84b6863a834956bc6b13a635b1d692 by Laurent Montel.
Committed on 04/02/2026 at 12:23.
Pushed by mlaurent into branch 'release/25.12'.

Fix bug 515470:  Kontact/Kmail doesn't render some plain text e-mails

setContent is limited to 2Mo (from doc) but it seems not be the case.
Or text is converted in setContent and it takes more that 2Mo

I reduce size => now it can be displayed.
(cherry picked from commit 9290e745102049bd3d9908cf94cd995765550c15)

M  +4    -2    messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp

https://invent.kde.org/pim/messagelib/-/commit/1fcd9e609e84b6863a834956bc6b13a635b1d692