composer: Warn about possibly non-complying messages
commit40a7e4aa3aaf225772217ab557ff9649a7dd104f
authorJan Kundrát <jkt@kde.org>
Mon, 4 Sep 2017 11:10:51 +0000 (4 13:10 +0200)
committerJan Kundrát <jkt@kde.org>
Mon, 4 Sep 2017 11:10:51 +0000 (4 13:10 +0200)
treea5bb7ca44955da16fafdca6b5cd5852c0057fe12
parentf70690899d2a6c69495d225214a7279ba8c1ff73
composer: Warn about possibly non-complying messages

TL;DR: git-format-patch produces stuff which looks *almost* like an
e-mail, except that it is not really an e-mail.

I'm contributing to some open source project which use mailing lists and
patchwork for their patch management. They do not like patches sent as
inline attachments for some unspecified legacy reasons, and I'm trying
to fit there.

One thing which *mostly* works is using the `git format-patch -M -n -s
--thread --to ... outgoing/*` for creating .patch files which look
*like* e-mails, then renaming them to .eml, and using some UI file
manager and Trojita to drag-and-drop them to an IMAP folder. That's a
crazy workflow, isn't it? Perhaps Trojita should get a command line
option to process e-mail(s) from file/stdin/mbox, but hey, that's for
later (and it would require local parsing, so...).

In the meanwhile, this horrible workflow tends to bump into rough edges
every now and then. Unless one uses the `--threaded` option to g-s-e,
the message doesn't have a `Message-ID` header. Recipients are added in
response to the `--to` and `--cc` options. If one adds these recipients
when bouncing an e-mail, they show up as Resent-* headers. Patchwork on
the other hand silenty drops anything lacking Message-ID, To, or
Subject.

So this patch is really a bandaid. Perhaps I should give up on doing the
actual submission via Trojita. In fact, the only reason why I'm doing
that is because `git send-email` supports a full path to a sendmail-like
wrapper, but that wrapper cannot be a shell one-liner :).

Change-Id: I9e08de2a450cec89163198ba8c0aadd405913316
src/Gui/ComposeWidget.cpp