I used to create emails with attached files using mailto: and kmail, but latter versions did stop working properly. The standard way to work is to urlencode the mailto link so kmail decodes it and creates the message. Now kmail2 does not accept the urlencoded link. TO, CC fields get mixed up. And if you send the code urldecoded then line breaks are not printed correctly. Example: What should work <a href= "mailto:SOMEONE%20%3Csomeonesmail%40email.com%3E?cc=someothermail@othermail.com,YETANOTHER20%3Cyetanothermail%40yetanothermail.com%3E&subject=a%20subject%20here%202016&body=Dear%20Al%C3%ADcia%2C%0A%0ABlahAdjuntem%20factura%20n%C3%BAm%203043%20de%20Bredax.%0A%0ASalutacions%2C%0A&attachment=/somefile.pdf" link should work and />Urlencoded Correct email</a> <a href= "mailto:SOMEONE <someonesmail@email.com>?cc=someothermail@othermail.com,YETANOTHER<yetanothermail@yetanothermail.com>&subject=a subject here 2016&body=Dear Alícia, BlahAdjuntem factura núm 3043 de Bredax. Salutacions, &attachment=/somefile.pdf" />Urldecoded incorrect mail</a> The second one is the one that kind of works, yet line breaks are not interpreted correctly. Reproducible: Always Steps to Reproduce: 1. Test the links I send you 2. You'll see the first does not compose correcly and the second do not have line breaks. Actual Results: 2. You'll see the first does not compose correcly and the second do not have line breaks. Expected Results: The first link should generate correct email with TO, 2 CC fields, body attachment and properly formated body. I am using firefox from last Ubuntu 16.04
Tracked in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832795 I can confirm that handling mailto: links are broken. As of one of the last updates, using mailto: links with KMail is broken. mailto: URIs passed by any web browser (tested with Firefox and Konqueror) are not properly unescaped, and URI entities like %0A end up in the mail. Firefox even quotes colons in the subject and these also end up escaped in the subject line (e.g. when clicking the reply link in the Debian BTS).
Please provide a mail (as mbox) which has this bug please. Thanks
(In reply to Laurent Montel from comment #2) > Please provide a mail (as mbox) which has this bug please. > Thanks Sorry, that request does not make any sense to me. Please read the bug report again.
Ok so sorry if you can't provide a test case I will not lose my time against it. That's all. I don't have a lot of time to debug/test/fix etc. so if you don't want to help me it so I will not lose my time against this bug. I am more bugs to fix. Regards.
(In reply to Laurent Montel from comment #4) > Ok so sorry if you can't provide a test case I will not lose my time against > it. > That's all. > I don't have a lot of time to debug/test/fix etc. so if you don't want to > help me it so I will not lose my time against this bug. > I am more bugs to fix. > Regards. Well, this bug simply is *not* about opening a specific mail inside KMail, but about *composing* a new one from a mailto: link, e.g. when called from a web browser. There simply *is no* mail anyone could provide as mbox, because the bug is not about displaying mail. Test cases for the mailto: feature have already been posted in the initial bug report.
> Test cases for the mailto: feature have already been posted in the initial > bug report. You can find several millions of other test cases at http://bugs.debian.org - simply choose a random bug report and click a random „reply“ link.
Git commit 2ee5bc147480baf205611d333fe68233f9e1aa47 by Montel Laurent. Committed on 30/07/2016 at 13:14. Pushed by mlaurent into branch 'Applications/16.08'. Convert %0A to \n M +1 -1 messagecore/autotests/stringutiltest.cpp M +6 -0 messagecore/src/utils/stringutil.cpp http://commits.kde.org/messagelib/2ee5bc147480baf205611d333fe68233f9e1aa47
Git commit b5411e67a29e2e74c14f7663922f672a916968c5 by Montel Laurent. Committed on 30/07/2016 at 13:20. Pushed by mlaurent into branch 'Applications/16.08'. Fix Bug 363586 - Kmail2 handles mailto: incorrectly. urlencoded does not work FIXED-IN: 5.3.0 M +2 -1 kmail/src/kmkernel.cpp http://commits.kde.org/kdepim/b5411e67a29e2e74c14f7663922f672a916968c5
Hi, sorry, I do not think this patch is complete. In fact, I think it is just a new bug. Your patch simply replaces all %0A with \n in the body. In fact, the body needs to be passed through decodeMailtoUrl() or something like that just like the to= query parameter is. Moreover, the same applies to subject=, and *any* other field. (On a side note, the %xx encoding has nothing to do with HTML, it is URI encoding). You can use any mail in the Debian bug tracker and click the reply link to test whether the fix is complete. -nik
Hi, my last comment actually came in between your two commits. I think the second commit might actually fix the bug. Thanks ☺!