Bug 426238 - Reply quote is not always pre-filled
Summary: Reply quote is not always pre-filled
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 5.15.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-06 10:45 UTC by Thomas Monjalon
Modified: 2020-09-16 05:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
email which is not quoted on reply (8.96 KB, application/mbox)
2020-09-07 06:51 UTC, Thomas Monjalon
Details
proposed fix (1.68 KB, patch)
2020-09-15 22:08 UTC, Thomas Monjalon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Monjalon 2020-09-06 10:45:03 UTC
SUMMARY

When replying a mail, the quote is sometimes missing.

STEPS TO REPRODUCE
1. Click on "Reply"

OBSERVED RESULT

Sometimes the text area is blank, sometimes it is correctly pre-filled with quoted message. It depends on which email is replied.
Comment 1 Laurent Montel 2020-09-06 14:41:05 UTC
Hello,
I need a testcase. Could you send me email which create a problem please ?
Do you reply mail as html ?
Comment 2 Thomas Monjalon 2020-09-06 21:37:53 UTC
This email is not quoted on reply:
https://patches.dpdk.org/patch/76484/mbox/

This email is quoted well when replying:
https://patches.dpdk.org/patch/76166/mbox/

It seems it depends on the sender (probably its MTA).
Comment 3 Laurent Montel 2020-09-07 04:57:37 UTC
Works fine here.
Theses mails are stored in different folder ? do you use different reply template ?
Comment 4 Thomas Monjalon 2020-09-07 06:51:30 UTC
Created attachment 131460 [details]
email which is not quoted on reply
Comment 5 Thomas Monjalon 2020-09-07 06:52:40 UTC
After testing above URLs, they work fine for me as well.
The problem is with emails as they are locally. Please check with the attachment.

Note: I do not compose as HTML, all emails are in the same folder, and there is no special template.
I started seeing this regression recently (5.15 I believe).
Comment 6 Thomas Monjalon 2020-09-08 20:24:10 UTC
The bug is not present with emails having a Content-Type field.
Comment 7 Thomas Monjalon 2020-09-15 22:08:27 UTC
Created attachment 131686 [details]
proposed fix

I think I have a fix in kmime Content::parse()
+    if (ct->isEmpty())
+        ct->setMimeType("text/plain");

Please check the attachment, thanks.
Comment 8 Laurent Montel 2020-09-16 05:35:02 UTC
Git commit 6d637f9a34e09f6577c52436003fd102b65a8f43 by Laurent Montel.
Committed on 16/09/2020 at 05:34.
Pushed by mlaurent into branch 'release/20.08'.

based on patch from Thomas Monjalon <thomas@monjalon.net>

Fix discarded content if no Content-Type
When replying to an email without any content type header,
the content was ignored (i.e. not quoted in the reply).

M  +4    -4    autotests/contenttest.cpp
M  +4    -1    src/kmime_content.cpp

https://invent.kde.org/pim/kmime/commit/6d637f9a34e09f6577c52436003fd102b65a8f43