summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-11 12:18:18 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-09-11 12:18:18 +0300
commite8c4245e1a4c8e2cb130cfcefa4474909bcb7906 (patch)
tree67ded4d51d6b541cf999da0ee4908fdfdc62f067
parent175307d1101993b09d7f0d683404709918683afa (diff)
downloadmailutils-e8c4245e1a4c8e2cb130cfcefa4474909bcb7906.tar.gz
mailutils-e8c4245e1a4c8e2cb130cfcefa4474909bcb7906.tar.bz2
Document how to set body content-type and encoding in multipart messages
This closes https://savannah.gnu.org/support/?109866
-rw-r--r--doc/texinfo/programs/mail.texi22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/texinfo/programs/mail.texi b/doc/texinfo/programs/mail.texi
index 999dc50cb..b4c68a100 100644
--- a/doc/texinfo/programs/mail.texi
+++ b/doc/texinfo/programs/mail.texi
@@ -1443,7 +1443,7 @@ the old contents of your message.
1443@subsection Composing Multipart Messages 1443@subsection Composing Multipart Messages
1444 1444
1445Multipart messages (or MIME, for short) can be used to send text in 1445Multipart messages (or MIME, for short) can be used to send text in
1446character set other than ASCII, attach non-text files, send multiple 1446character sets other than ASCII, attach non-text files, send multiple
1447parts in alternative formats, etc. 1447parts in alternative formats, etc.
1448 1448
1449Technically speaking, the boolean variable @code{mime} 1449Technically speaking, the boolean variable @code{mime}
@@ -1516,7 +1516,22 @@ $ mail --content-type=text/html --attach=in.html \
1516 --content-type=application/x-tar --attach=archive.tar 1516 --content-type=application/x-tar --attach=archive.tar
1517@end example 1517@end example
1518 1518
1519Similarly, the encoding to use is set up by the @option{--encoding} 1519To change the content type of the message body when sending a message
1520with attachments, use the trailing @option{--content-type} option,
1521i.e. the option not followed by another @option{--attach} option:
1522
1523@example
1524$ mail --content-type=text/html --attach=in.html \
1525 --content-type=application/x-tar --attach=archive.tar \
1526 --content-type=text/plain
1527@end example
1528
1529@nointent
1530This example adds two attachments with different content types and
1531switched back to the @samp{text/plain} content type for the message
1532body.
1533
1534The encoding to use is set up by the @option{--encoding}
1520option. As well as @option{--content-type}, this option affects all 1535option. As well as @option{--content-type}, this option affects all
1521attachments supplied after it in the command line as well as the 1536attachments supplied after it in the command line as well as the
1522message body read from the standard input, until changed by 1537message body read from the standard input, until changed by
@@ -1530,6 +1545,9 @@ $ mail --content-type=text/html --encoding=quoted-printable \
1530 --attach=archive.tar 1545 --attach=archive.tar
1531@end example 1546@end example
1532 1547
1548A trailing @option{--encoding} option sets the encoding of the message
1549body.
1550
1533Each attachment can also be assigned a @dfn{description} and a 1551Each attachment can also be assigned a @dfn{description} and a
1534@dfn{file name}. Normally, these are the same as the file name 1552@dfn{file name}. Normally, these are the same as the file name
1535supplied with the @option{--attach} option. However, you can change 1553supplied with the @option{--attach} option. However, you can change

Return to:

Send suggestions and report system problems to the System administrator.