Subject: M-x report-emacs-bug transmits garbled email contents to kmail

From: Bruno Haible <[email-masked]>
Date: Sat, 21 Oct 2017 21:42:57 +0200

Hi,

I set out to report a bug in Emacs, as written in
https://www.gnu.org/software/emacs/documentation.html: by using
M-x report-emacs-bug. I filled in the text, then did C-c C-c to send it.
It told me to choose among
  mail client
and
  smtp.
Since I don't have SMTP on my machine (I use kmail, which is configured
to use an IMAP account somewhere), I typed 'mail client'.

The result:
  * It opened a kmail window (good).
  * The "From" email address that I had entered was lost (which is
    understandable, since kmail supports only predefined email addresses
    for outgoing mail), and not dramatic (easy to correct).
  * It filled the subject line and the mail body with text, with many
    URI-encoded characters. (See attached screenshot.)
  * When I sent this mail, the debbugs filter did not restore the original
    mail body, by unescaping. You can see the result at
    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28930

Fortunately, Emacs saved a copy of the buffer in a file (~/*message*-<date>),
so that I could easily compose the mail in the mailer again. This led to
  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28931

It could be that this is a bug in kmail. If so, please redirect to
https://bugs.kde.org/.