Bug 368394 - Outlook replies double-spaced paragraphs
Summary: Outlook replies double-spaced paragraphs
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 5.22.3
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
: 447881 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-07 13:56 UTC by roman.dinga
Modified: 2023-11-20 17:26 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Original test message from Outlook (5.02 KB, application/mbox)
2016-10-12 08:48 UTC, roman.dinga
Details
Reply mail generated by KMail (3.64 KB, application/mbox)
2016-10-12 08:49 UTC, roman.dinga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description roman.dinga 2016-09-07 13:56:40 UTC
When replying to mails composed by Outlook, the quoted mail is double-spaced. There is additional space (not a line) below each paragraph. I have managed to debug this and found that the Kmail composer sets a top-margin and bottom-margin property to each paragraph to 12px (looks like this top-margin:12px; bottom-margin: 12px). When using an external editor (like Kate) and doing a search & replace of all the top-margin and bottom-margin properties with 0px (top-margin:0px; bottom-margin: 0px), the mail is formatted correctly upon closing Kate, but the composer window cannot be used for mail editing (always starts another instance of Kate). The workaround is using the "Insert HTML" functionality of the Kmail composer, but it's a cumbersome solution, since all HTML tags need to be manually inserted. Thunderbird and Evolution already handle these replies correctly. Can something be done with Kmail as well please? It's by far the best e-mail client and this is the only show-stopper for me from using it in a corporate environment.

Thank you very much.

Reproducible: Always

Steps to Reproduce:
1. get email from Outlook
2. reply to it
3. composer formats a bad mail with double-spaced paragraphs

Actual Results:  
got a wrongly composed mail

Expected Results:  
paragraphs with 0 top and bottom margin
Comment 1 Laurent Montel 2016-10-11 12:36:38 UTC
could you provide a mail example as mbox please ?
Comment 2 roman.dinga 2016-10-12 08:48:01 UTC
Created attachment 101537 [details]
Original test message from Outlook

This is the original mail recevied from MS Outlook - look OK, in read mode in KMail
Comment 3 roman.dinga 2016-10-12 08:49:07 UTC
Created attachment 101538 [details]
Reply mail generated by KMail

This is the reply mail generated by KMail, with bottom and tp margins set to 12px, which make the double-lining.
Comment 4 roman.dinga 2016-10-12 08:50:47 UTC
I have added 2 mbox files:
1. one is the original mail sent to me from Outlook, which is rendered OK in KMail, in read mode
2. the 2nd one is the reply mail generated by the KMail composer, which contains the top and bottom margins set to 12px, which make the double-lining, which is incorrect.
Comment 5 roman.dinga 2016-11-14 10:53:45 UTC
Hello,

Would just want to ask if there is any plan for this bug? It is the only thing preventing me from using it productively with Exchange server...

Thank you very much.
Comment 6 roman.dinga 2017-02-08 13:03:35 UTC
Hello I would just like to ask if solving this issue is planned somewhere in the near future?

Thank you very much.
Comment 8 roman.dinga 2017-04-21 12:25:28 UTC
It's not related really, because in that case, double line breaks are created. In this case top and bottom borders are set to 12px, where they shouldn't be. So the additional space is not really due to more lines, but because of bad border handling.
Comment 9 Christoph Feck 2017-04-26 18:14:53 UTC
Right.

Comment #7 is bug 344099.
Comment 10 Emre 2018-03-08 09:42:05 UTC
I'm suffering from this as well. Forwarded emails show up in the email with double spacing, rendering difficult to read to the eyes. 

I assume this is similar issue like we had back in days when Evolution used its own rendering engine. It was fixed in Evolution when they moved to webkitgtk to render emails. Thunderbird is also handling it well.
Can't Kmail use webkit as well?
Comment 11 droidSumit 2018-03-08 14:20:06 UTC
I too confirm this issue of getting *blank line* added after each line of statement. I am facing another issue related to template where with *New mail my HTML signature coming as plain text* while same signature is fine with Mail reply and forwarding.
Comment 12 Emre 2018-09-06 21:02:15 UTC
Dears, any development on this? KMail added EWS resource and it seems to work good, but without solving this bug, we can't use Kmail in Corporate Office 365 environment.
Comment 13 Thomas 2019-01-25 11:38:09 UTC
There are MANY open issues with additional line breaks and it all breaks down to the stylesheet defined in the header of emails send from kmail:

p, li { white-space: pre-wrap; }

Also a email signature is affected by this style.

You know an span is an inline element and it should always be inline. So `<span>text</span><span> more text</span>` should be shown the same as `<span>text more text</span>` but when you wrap it with `<p style="white-space: pre-wrap;">` you will get a line break between them. Adding a break between the spans will even cause a second line break.

In conclusion: this is unecessary code and makes kmail unusable for almost all people that prefer html mails. Please think about removing the stylesheet from the composed emails (if you want you can still add this style to the view windows). Thanks in advance!
Comment 14 Craig 2020-01-29 16:48:10 UTC
Any updates or workarounds on this anyone's figured? Major bummer as I love kontact/KDE but moved to Thunderbird some while back due to this and other issues, came back to it stoked to see the EWS support etc all working great and how I've missed it! Then sent a reply and everything is always double spaced :( In my case I sent a reply to an email sent to myself using Thunderbird, so not an Outlook only issue - makes unusable especially in business/contracting/professional capacity and biggest bummer ever!

Anyone have any ideas or hopefully devs can provide some input? I know there was a bugfix on the qt side bit ago but per comments in here the issue is now the default html/stylesheet being used by kmail

Arch Linux running latest kdepim 5.13.1 and qt etc
Comment 15 Emre 2020-01-29 17:51:37 UTC
I gave up long time ago on this. Evolution can handle the spaces, you can use that one if double space is really an issue. 
For myself, I switched to using Office365 on the Web, the webmail of Outlook. Works mostly well and has other integrations (calendars, room finder, name completion...)
Comment 16 roman.dinga 2020-01-29 18:36:32 UTC
The same reason why I switched to Evolution instead. Evolution devs are much much more responsive in solving issues than Kmail devs (0% success rate with Kmail and pretty much all KDE related apps in solving bugs). I think Kmail is essentially dead, maybe Kube will be a usable Qt based client...
Comment 17 Christoph Feck 2020-01-29 20:56:16 UTC
The only other issue you reported is in telepathy, which is indeed long dead. I am sorry that this results in a 0% success rate for you. For my 520 reported issues in KDE software, 493 got resolved.

If you are interested in the development of kmail, I suggest to subscribe to kde-commits mailing list, and count the number of daily commits made in the various KDEPIM repositories.
Comment 18 roman.dinga 2020-01-30 16:20:24 UTC
I am very happy for you, that so many bugs have been resolved. Unfortunately, I had a few showstopper bugs (not just ones reported by me, but by others as well, which I followed) and in all cases, there was pretty much no response. I had an impression that Plasma in general just keeps adding new features and not investing any time into solving bugs, so I had to switch over to other solutions. But that is my experience - someone else may have a completely other perception. Anyway, any reasonable dev team would know that this paricular issue is a complete showstopper for any serious usage of the mail client and leaving it untouched for years is pure non-sense. I also work in IT sector and if my product has a high-prio showstopper bug like this (that prevents 99% of users from normally using it) then I would invest resources into solving it, instead of pouring tons of commits into new features etc. But I understand that this is an open-source project, that people participate on for free, in their free time, therefore I do not push it. Anyway, if you read my first comment, when I reported the issue, I did a complete analysis of what is wrong and why the mails look wrong (also invested hours of my time), so I think that for a developer who knows where to look, it would be a few minutes of time to fix it.
Comment 19 Peter 2021-12-01 14:12:19 UTC
Actually kmail 5.18.3.

Given that a lot of email correspondents are using Outlook, this problem is a bit inconvenient, and detracts from the professionalism of the replies we make using kmail.  Any solution/workaround would be much appreciated.  

Thanks and regards
Comment 20 Emre 2021-12-04 17:36:56 UTC
(In reply to Peter Wibberley from comment #19)
> Actually kmail 5.18.3.
> 
> Given that a lot of email correspondents are using Outlook, this problem is
> a bit inconvenient, and detracts from the professionalism of the replies we
> make using kmail.  Any solution/workaround would be much appreciated.  
> 
> Thanks and regards

 Hi Peter, it seems this bug would not get resolved, probably it needs very heavy changes on Kmail and hence nobody touches it from the developers. Workarounds are proposed in other answers, ie switch to Evolution, or use Outlook on the Web, or even Thunderbird.
Comment 21 Peter 2022-01-18 16:29:24 UTC
(In reply to Emre from comment #20)
> (In reply to Peter Wibberley from comment #19)
> > Actually kmail 5.18.3.
> > 
> > Given that a lot of email correspondents are using Outlook, this problem is
> > a bit inconvenient, and detracts from the professionalism of the replies we
> > make using kmail.  Any solution/workaround would be much appreciated.  
> > 
> > Thanks and regards
> 
>  Hi Peter, it seems this bug would not get resolved, probably it needs very
> heavy changes on Kmail and hence nobody touches it from the developers.
> Workarounds are proposed in other answers, ie switch to Evolution, or use
> Outlook on the Web, or even Thunderbird.

Emre,  

I'd like to keep with kmail, if at all possible.   I was wondering whether it would be possible to define an external script that would replace all instances of "margin-top:12px" and "margin-bottom:12px" with "margin-top:0px" and "margin-bottom:0px".   Could such a script ten be attached to a user-defined button?   Unfortunately, this is beyond my current (and possibly any future) level of expertise.

Thanks and regards,

Peter
Comment 22 Peter 2022-02-25 17:58:12 UTC
Not entirely sure what I'm doing here, but I seem to have improved things a little by modifying Settings-->Configure Kmail-->Standard Templates, so that %QUOTE is replaced by %TEXTPIPE="sed '/^$/d'".  This seems to reduce the huge spacing between lines when replying to Outlook-generated emails to something vaguely acceptable.
Comment 23 Daniel 2022-02-27 20:05:13 UTC
*** Bug 447881 has been marked as a duplicate of this bug. ***
Comment 24 Syiad 2023-04-13 13:56:01 UTC
Is someone actually working on this, or is the proposed solution to use Thunderbird instead of Kontact?

Why is kmail trying to change the format of the quoted html in the first place? This really makes e-mail responses look ridiculous, thereby prohibiting the use of Kontact/kmail in a professional context.
Comment 25 Emre 2023-04-14 09:19:46 UTC
(In reply to Syiad from comment #24)
> Is someone actually working on this, or is the proposed solution to use
> Thunderbird instead of Kontact?
> 
> Why is kmail trying to change the format of the quoted html in the first
> place? This really makes e-mail responses look ridiculous, thereby
> prohibiting the use of Kontact/kmail in a professional context.

Hi Syiad, if you're suffering from this bug, I suggest you move to Evolution or Outlook on the Web. I dont think this will be solved. It's been 7 years it's been reported...
Comment 26 Peter 2023-04-14 16:59:10 UTC
I've been messing around with changing the templates, replacing %TEXT with commands such as %TEXTPIPE="sed '/^$/d'" .    It seems not to matter what combination of line feeds (/n) or empty lines (^$) I delete, I get  a superfluous line with one space between each line of the original message text.  However, using 'Forward To', rather than 'Reply to Author' or 'Reply to All' seems to work much better (although any embedded image files don't display).  I have no idea, but might this help isolate the problem?   

Regards
Comment 27 Syiad 2023-06-19 11:44:52 UTC
*** This bug has been confirmed by popular vote. ***
Comment 28 Terényi, Balázs 2023-11-20 17:26:56 UTC
My workaround is copying the HTML to the editor window from the message view pane. Very annoying, but works. I have new lines between paragraphs when replying, maybe this is an another problem. Please solve this. Thanks in advance!