Add -M and -m options (Viktor Szépe, Ralph Corderoy)..
commitf1a775b3eaf15db07746029357c7469fb2763097
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Wed, 8 Jun 2016 17:22:03 +0000 (8 19:22 +0200)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Thu, 15 Sep 2016 13:57:58 +0000 (15 15:57 +0200)
treecec825a0cf7830077c1af352a21cf7c71d9bcb7e
parent0db059b341f5a3f671392d6558688670a579f88c
Add -M and -m options (Viktor Szépe, Ralph Corderoy)..

Viktor Szépe (viktor at szepe dot net) reported

  Please consider supporting
    cat email.html | s-nail --some-flag-for-html add@re.ss

and i responded

  ?0[steffen@wales nail.git]$ git grep -e text/plain --and -e XXX
  sendout.c:   contenttype = "text/plain"; /* XXX mail body - always text/plain, want XX? */

but Ralph is right stating

  Does
      mail -s foo -a index.html ralph </dev/null
  do?

because nowadays it seems that some LOG reports etc. are generated
directly in HTML / XML / whatever, and it would be pretty useful
to be able to pass them in directly, in the right format, without
any shell script snippet on top in order to be able to create
temporary files, whatever.

It is not that i like it, and we long have Brezn's wish to be able
to swallow and classify a.k.a. integrate multipart mails as such,
but this won't work out until v15 (cpl. diff. exec. paths).
The above should usually automatically create
multipart/alternative whenever we just have an idea of how to
create a text version, but this also won't work (somewhat ditto).

So, for heaven's sake, add "-M content-type" for STDIN and "-m
file" for some other playing around, ensure that we internally
know the given MIME type.

Since we are so restricted for now we have to actively suppress
*message-inject-head*, *signature* and *message-inject-tail* for
-M and -m, at a later time these may then cause multipart messages
just like, e.g., mailman generates for HTML ML messages when there
is a plain text footer.  Sic.
collect.c
main.c
nail.1
nail.h
sendout.c