diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 12:18:18 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 12:18:18 +0300 |
commit | e8c4245e1a4c8e2cb130cfcefa4474909bcb7906 (patch) | |
tree | 67ded4d51d6b541cf999da0ee4908fdfdc62f067 | |
parent | 175307d1101993b09d7f0d683404709918683afa (diff) | |
download | mailutils-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.texi | 22 |
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 | ||
1445 | Multipart messages (or MIME, for short) can be used to send text in | 1445 | Multipart messages (or MIME, for short) can be used to send text in |
1446 | character set other than ASCII, attach non-text files, send multiple | 1446 | character sets other than ASCII, attach non-text files, send multiple |
1447 | parts in alternative formats, etc. | 1447 | parts in alternative formats, etc. |
1448 | 1448 | ||
1449 | Technically speaking, the boolean variable @code{mime} | 1449 | Technically 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 | ||
1519 | Similarly, the encoding to use is set up by the @option{--encoding} | 1519 | To change the content type of the message body when sending a message |
1520 | with attachments, use the trailing @option{--content-type} option, | ||
1521 | i.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 | ||
1530 | This example adds two attachments with different content types and | ||
1531 | switched back to the @samp{text/plain} content type for the message | ||
1532 | body. | ||
1533 | |||
1534 | The encoding to use is set up by the @option{--encoding} | ||
1520 | option. As well as @option{--content-type}, this option affects all | 1535 | option. As well as @option{--content-type}, this option affects all |
1521 | attachments supplied after it in the command line as well as the | 1536 | attachments supplied after it in the command line as well as the |
1522 | message body read from the standard input, until changed by | 1537 | message 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 | ||
1548 | A trailing @option{--encoding} option sets the encoding of the message | ||
1549 | body. | ||
1550 | |||
1533 | Each attachment can also be assigned a @dfn{description} and a | 1551 | Each 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 |
1535 | supplied with the @option{--attach} option. However, you can change | 1553 | supplied with the @option{--attach} option. However, you can change |