積丹尼 Dan Jacobson
2017-02-13 23:20:53 UTC
Problem:
$ echo 中|mutt -s test jidanni
$ echo 中|mail.mailutils -s test jidanni
other mailers put
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
into the headers, mail.mailutils does not.
Man page has
--content-type=TYPE
set content type for subsequent --attach options
and
--encoding=NAME
set encoding for subsequent --attach options
OK. Let's see what
echo 中|mail.mailutils --content-type='text/plain; charset=utf-8' --encoding=8-big -s test jidanni
does.
Result: nothing.
Just like it said it is for attachments.
OK,
let's try
-a, --append=HEADER: VALUE append given header to the message being
sent
echo 中|mail.mailutils \
-a MIME-Version: 1.0 \
-a Content-Type: 'text/plain; charset=utf-8' \
-a Content-Transfer-Encoding: 8bit \
-s test jidanni
mail.mailutils: Cannot parse address `text/plain; charset=utf-8' (while expanding `text/plain; charset=utf-8'): Malformed email address
OK maybe then let's try
echo 中|mail.mailutils \
-a 'MIME-Version: 1.0' \
-a 'Content-Type: text/plain; charset=utf-8' \
-a 'Content-Transfer-Encoding: 8bit' \
-s test jidanni
which works.
Anyway, your man page
-a, --append=HEADER: VALUE append given header to the message being
sent
should be
-a, --append="HEADER: VALUE" append given header to the message being
sent
OK?
Furthermore the man page and Info pages should have a prominent warning
that for anything other than ASCII mails, mail.mailutils will send out
invalid mails unless one manually adds headers. And add an example with
at least the three above headers and possibly also
Content-Disposition: inline .
mail.mailutils (GNU Mailutils) 3.1.1
$ echo 中|mutt -s test jidanni
$ echo 中|mail.mailutils -s test jidanni
other mailers put
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
into the headers, mail.mailutils does not.
Man page has
--content-type=TYPE
set content type for subsequent --attach options
and
--encoding=NAME
set encoding for subsequent --attach options
OK. Let's see what
echo 中|mail.mailutils --content-type='text/plain; charset=utf-8' --encoding=8-big -s test jidanni
does.
Result: nothing.
Just like it said it is for attachments.
OK,
let's try
-a, --append=HEADER: VALUE append given header to the message being
sent
echo 中|mail.mailutils \
-a MIME-Version: 1.0 \
-a Content-Type: 'text/plain; charset=utf-8' \
-a Content-Transfer-Encoding: 8bit \
-s test jidanni
mail.mailutils: Cannot parse address `text/plain; charset=utf-8' (while expanding `text/plain; charset=utf-8'): Malformed email address
OK maybe then let's try
echo 中|mail.mailutils \
-a 'MIME-Version: 1.0' \
-a 'Content-Type: text/plain; charset=utf-8' \
-a 'Content-Transfer-Encoding: 8bit' \
-s test jidanni
which works.
Anyway, your man page
-a, --append=HEADER: VALUE append given header to the message being
sent
should be
-a, --append="HEADER: VALUE" append given header to the message being
sent
OK?
Furthermore the man page and Info pages should have a prominent warning
that for anything other than ASCII mails, mail.mailutils will send out
invalid mails unless one manually adds headers. And add an example with
at least the three above headers and possibly also
Content-Disposition: inline .
mail.mailutils (GNU Mailutils) 3.1.1