d5e82c7b4adb478967f00e50570c5ffe8f7729a6
[gnus] / texi / emacs-mime.texi
1 \input texinfo
2
3 @setfilename emacs-mime
4 @settitle Emacs MIME Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Emacs MIME: (emacs-mime).   The MIME de/composition library.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @ifnottex
18
19 This file documents the Emacs MIME interface functionality.
20
21 Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
22
23 Permission is granted to copy, distribute and/or modify this document
24 under the terms of the GNU Free Documentation License, Version 1.1 or
25 any later version published by the Free Software Foundation; with no
26 Invariant Sections, with the Front-Cover texts being ``A GNU
27 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
28 license is included in the section entitled ``GNU Free Documentation
29 License'' in the Emacs manual.
30
31 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
32 this GNU Manual, like GNU software.  Copies published by the Free
33 Software Foundation raise funds for GNU development.''
34
35 This document is part of a collection distributed under the GNU Free
36 Documentation License.  If you want to distribute this document
37 separately from the collection, you can do so by adding a copy of the
38 license to the document, as described in section 6 of the license.
39 @end ifnottex
40
41 @tex
42
43 @titlepage
44 @title Emacs MIME Manual
45
46 @author by Lars Magne Ingebrigtsen
47 @page
48
49 @vskip 0pt plus 1filll
50 Copyright @copyright{} 1998, 1999, 2000 Free Software Foundation, Inc.
51
52 Permission is granted to copy, distribute and/or modify this document
53 under the terms of the GNU Free Documentation License, Version 1.1 or
54 any later version published by the Free Software Foundation; with the
55 Invariant Sections being none, with the Front-Cover texts being ``A GNU
56 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
57 license is included in the section entitled ``GNU Free Documentation
58 License'' in the Emacs manual.
59
60 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
61 this GNU Manual, like GNU software.  Copies published by the Free
62 Software Foundation raise funds for GNU development.''
63
64 This document is part of a collection distributed under the GNU Free
65 Documentation License.  If you want to distribute this document
66 separately from the collection, you can do so by adding a copy of the
67 license to the document, as described in section 6 of the license.
68 @end titlepage
69 @page
70
71 @end tex
72
73 @node Top
74 @top Emacs MIME
75
76 This manual documents the libraries used to compose and display
77 @sc{mime} messages.
78
79 This is not a manual meant for users; it's a manual directed at people
80 who want to write functions and commands that manipulate @sc{mime}
81 elements.
82
83 @sc{mime} is short for @dfn{Multipurpose Internet Mail Extensions}.
84 This standard is documented in a number of RFCs; mainly RFC2045 (Format
85 of Internet Message Bodies), RFC2046 (Media Types), RFC2047 (Message
86 Header Extensions for Non-ASCII Text), RFC2048 (Registration
87 Procedures), RFC2049 (Conformance Criteria and Examples).  It is highly
88 recommended that anyone who intends writing @sc{mime}-compliant software
89 read at least RFC2045 and RFC2047.
90
91 @menu
92 * Interface Functions::   An abstraction over the basic functions.
93 * Basic Functions::       Utility and basic parsing functions.
94 * Decoding and Viewing::  A framework for decoding and viewing.
95 * Composing::             MML; a language for describing MIME parts.
96 * Standards::             A summary of RFCs and working documents used.
97 * Index::                 Function and variable index.
98 @end menu
99
100
101 @node Interface Functions
102 @chapter Interface Functions
103 @cindex interface functions
104 @cindex mail-parse
105
106 The @code{mail-parse} library is an abstraction over the actual
107 low-level libraries that are described in the next chapter.
108
109 Standards change, and so programs have to change to fit in the new
110 mold.  For instance, RFC2045 describes a syntax for the
111 @code{Content-Type} header that only allows ASCII characters in the
112 parameter list.  RFC2231 expands on RFC2045 syntax to provide a scheme
113 for continuation headers and non-ASCII characters.
114
115 The traditional way to deal with this is just to update the library
116 functions to parse the new syntax.  However, this is sometimes the wrong
117 thing to do.  In some instances it may be vital to be able to understand
118 both the old syntax as well as the new syntax, and if there is only one
119 library, one must choose between the old version of the library and the
120 new version of the library.
121
122 The Emacs MIME library takes a different tack.  It defines a series of
123 low-level libraries (@file{rfc2047.el}, @file{rfc2231.el} and so on)
124 that parses strictly according to the corresponding standard.  However,
125 normal programs would not use the functions provided by these libraries
126 directly, but instead use the functions provided by the
127 @code{mail-parse} library.  The functions in this library are just
128 aliases to the corresponding functions in the latest low-level
129 libraries.  Using this scheme, programs get a consistent interface they
130 can use, and library developers are free to create write code that
131 handles new standards.
132
133 The following functions are defined by this library:
134
135 @table @code
136 @item mail-header-parse-content-type
137 @findex mail-header-parse-content-type
138 Parse a @code{Content-Type} header and return a list on the following
139 format:
140
141 @lisp
142 ("type/subtype"
143  (attribute1 . value1)
144  (attribute2 . value2)
145  ...)
146 @end lisp
147
148 Here's an example:
149
150 @example
151 (mail-header-parse-content-type
152  "image/gif; name=\"b980912.gif\"")
153 @result{} ("image/gif" (name . "b980912.gif"))
154 @end example
155
156 @item mail-header-parse-content-disposition
157 @findex mail-header-parse-content-disposition
158 Parse a @code{Content-Disposition} header and return a list on the same
159 format as the function above.
160
161 @item mail-content-type-get
162 @findex mail-content-type-get
163 Takes two parameters---a list on the format above, and an attribute.
164 Returns the value of the attribute.
165
166 @example
167 (mail-content-type-get
168  '("image/gif" (name . "b980912.gif")) 'name)
169 @result{} "b980912.gif"
170 @end example
171
172 @item mail-header-encode-parameter
173 @findex mail-header-encode-parameter
174 Takes a parameter string and returns an encoded version of the string.
175 This is used for parameters in headers like @code{Content-Type} and
176 @code{Content-Disposition}.
177
178 @item mail-header-remove-comments
179 @findex mail-header-remove-comments
180 Return a comment-free version of a header.
181
182 @example
183 (mail-header-remove-comments
184  "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)")
185 @result{} "Gnus/5.070027  "
186 @end example
187
188 @item mail-header-remove-whitespace
189 @findex mail-header-remove-whitespace
190 Remove linear white space from a header.  Space inside quoted strings
191 and comments is preserved.
192
193 @example
194 (mail-header-remove-whitespace
195  "image/gif; name=\"Name with spaces\"")
196 @result{} "image/gif;name=\"Name with spaces\""
197 @end example
198
199 @item mail-header-get-comment
200 @findex mail-header-get-comment
201 Return the last comment in a header.
202
203 @example
204 (mail-header-get-comment
205  "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)")
206 @result{} "Finnish Landrace"
207 @end example
208
209 @item mail-header-parse-address
210 @findex mail-header-parse-address
211 Parse an address and return a list containing the mailbox and the
212 plaintext name.
213
214 @example
215 (mail-header-parse-address
216  "Hrvoje Niksic <hniksic@@srce.hr>")
217 @result{} ("hniksic@@srce.hr" . "Hrvoje Niksic")
218 @end example
219
220 @item mail-header-parse-addresses
221 @findex mail-header-parse-addresses
222 Parse a string with list of addresses and return a list of elements like
223 the one described above.
224
225 @example
226 (mail-header-parse-addresses
227  "Hrvoje Niksic <hniksic@@srce.hr>, Steinar Bang <sb@@metis.no>")
228 @result{} (("hniksic@@srce.hr" . "Hrvoje Niksic")
229      ("sb@@metis.no" . "Steinar Bang"))
230 @end example
231
232 @item mail-header-parse-date
233 @findex mail-header-parse-date
234 Parse a date string and return an Emacs time structure.
235
236 @item mail-narrow-to-head
237 @findex mail-narrow-to-head
238 Narrow the buffer to the header section of the buffer.  Point is placed
239 at the beginning of the narrowed buffer.
240
241 @item mail-header-narrow-to-field
242 @findex mail-header-narrow-to-field
243 Narrow the buffer to the header under point.  Understands continuation
244 headers. 
245
246 @item mail-header-fold-field
247 @findex mail-header-fold-field
248 Fold the header under point.
249
250 @item mail-header-unfold-field
251 @findex mail-header-unfold-field
252 Unfold the header under point.
253
254 @item mail-encode-encoded-word-region
255 @findex mail-encode-encoded-word-region
256 Encode the non-ASCII words in the region.  For instance,
257 @samp{Naïve} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
258
259 @item mail-encode-encoded-word-buffer
260 @findex mail-encode-encoded-word-buffer
261 Encode the non-ASCII words in the current buffer.  This function is
262 meant to be called narrowed to the headers of a message.
263
264 @item mail-encode-encoded-word-string
265 @findex mail-encode-encoded-word-string
266 Encode the words that need encoding in a string, and return the result.
267
268 @example
269 (mail-encode-encoded-word-string
270  "This is naïve, baby")
271 @result{} "This is =?iso-8859-1?q?na=EFve,?= baby"
272 @end example
273
274 @item mail-decode-encoded-word-region
275 @findex mail-decode-encoded-word-region
276 Decode the encoded words in the region.
277
278 @item mail-decode-encoded-word-string
279 @findex mail-decode-encoded-word-string
280 Decode the encoded words in the string and return the result.
281
282 @example
283 (mail-decode-encoded-word-string
284  "This is =?iso-8859-1?q?na=EFve,?= baby")
285 @result{} "This is naïve, baby"
286 @end example
287
288 @end table
289
290 Currently, @code{mail-parse} is an abstraction over @code{ietf-drums},
291 @code{rfc2047}, @code{rfc2045} and @code{rfc2231}.  These are documented
292 in the subsequent sections.
293
294
295
296 @node Basic Functions
297 @chapter Basic Functions
298
299 This chapter describes the basic, ground-level functions for parsing and
300 handling.  Covered here is parsing @code{From} lines, removing comments
301 from header lines, decoding encoded words, parsing date headers and so
302 on.  High-level functionality is dealt with in the next chapter
303 (@pxref{Decoding and Viewing}).
304
305 @menu
306 * rfc2045::      Encoding @code{Content-Type} headers.
307 * rfc2231::      Parsing @code{Content-Type} headers.
308 * ietf-drums::   Handling mail headers defined by RFC822bis.
309 * rfc2047::      En/decoding encoded words in headers.
310 * time-date::    Functions for parsing dates and manipulating time.
311 * qp::           Quoted-Printable en/decoding.
312 * base64::       Base64 en/decoding.
313 * binhex::       Binhex decoding.
314 * uudecode::     Uuencode decoding.
315 * rfc1843::      Decoding HZ-encoded text.
316 * mailcap::      How parts are displayed is specified by the @file{.mailcap} file
317 @end menu
318
319
320 @node rfc2045
321 @section rfc2045
322
323 RFC2045 is the ``main'' @sc{mime} document, and as such, one would
324 imagine that there would be a lot to implement.  But there isn't, since
325 most of the implementation details are delegated to the subsequent
326 RFCs.
327
328 So @file{rfc2045.el} has only a single function:
329
330 @table @code
331 @item rfc2045-encode-string
332 @findex rfc2045-encode-string
333 Takes a parameter and a value and returns a @samp{PARAM=VALUE} string.
334 @var{value} will be quoted if there are non-safe characters in it.
335 @end table
336
337
338 @node rfc2231
339 @section rfc2231
340
341 RFC2231 defines a syntax for the @code{Content-Type} and
342 @code{Content-Disposition} headers.  Its snappy name is @dfn{MIME
343 Parameter Value and Encoded Word Extensions: Character Sets, Languages,
344 and Continuations}.
345
346 In short, these headers look something like this:
347
348 @example
349 Content-Type: application/x-stuff;
350  title*0*=us-ascii'en'This%20is%20even%20more%20;
351  title*1*=%2A%2A%2Afun%2A%2A%2A%20;
352  title*2="isn't it!"
353 @end example
354
355 They usually aren't this bad, though.
356
357 The following functions are defined by this library:
358
359 @table @code
360 @item rfc2231-parse-string
361 @findex rfc2231-parse-string
362 Parse a @code{Content-Type} header and return a list describing its
363 elements.
364
365 @example
366 (rfc2231-parse-string
367  "application/x-stuff;
368  title*0*=us-ascii'en'This%20is%20even%20more%20;
369  title*1*=%2A%2A%2Afun%2A%2A%2A%20;
370  title*2=\"isn't it!\"")
371 @result{} ("application/x-stuff"
372     (title . "This is even more ***fun*** isn't it!"))
373 @end example
374
375 @item rfc2231-get-value
376 @findex rfc2231-get-value
377 Takes one of the lists on the format above and returns
378 the value of the specified attribute.
379
380 @item rfc2231-encode-string
381 @findex rfc2231-encode-string
382 Encode a parameter in headers likes @code{Content-Type} and
383 @code{Content-Disposition}.
384
385 @end table
386
387
388 @node ietf-drums
389 @section ietf-drums
390
391 @dfn{drums} is an IETF working group that is working on the replacement
392 for RFC822.
393
394 The functions provided by this library include:
395
396 @table @code
397 @item ietf-drums-remove-comments
398 @findex ietf-drums-remove-comments
399 Remove the comments from the argument and return the results.
400
401 @item ietf-drums-remove-whitespace
402 @findex ietf-drums-remove-whitespace
403 Remove linear white space from the string and return the results.
404 Spaces inside quoted strings and comments are left untouched.
405
406 @item ietf-drums-get-comment
407 @findex ietf-drums-get-comment
408 Return the last most comment from the string.
409
410 @item ietf-drums-parse-address
411 @findex ietf-drums-parse-address
412 Parse an address string and return a list that contains the mailbox and
413 the plain text name.
414
415 @item ietf-drums-parse-addresses
416 @findex ietf-drums-parse-addresses
417 Parse a string that contains any number of comma-separated addresses and
418 return a list that contains mailbox/plain text pairs.
419
420 @item ietf-drums-parse-date
421 @findex ietf-drums-parse-date
422 Parse a date string and return an Emacs time structure.
423
424 @item ietf-drums-narrow-to-header
425 @findex ietf-drums-narrow-to-header
426 Narrow the buffer to the header section of the current buffer.
427
428 @end table
429
430
431 @node rfc2047
432 @section rfc2047
433
434 RFC2047 (Message Header Extensions for Non-ASCII Text) specifies how
435 non-ASCII text in headers are to be encoded.  This is actually rather
436 complicated, so a number of variables are necessary to tweak what this
437 library does.
438
439 The following variables are tweakable:
440
441 @table @code
442 @item rfc2047-default-charset
443 @vindex rfc2047-default-charset
444 Characters in this charset should not be decoded by this library.
445 This defaults to @code{iso-8859-1}.
446
447 @item rfc2047-header-encoding-list
448 @vindex rfc2047-header-encoding-list
449 This is an alist of header / encoding-type pairs.  Its main purpose is
450 to prevent encoding of certain headers.
451
452 The keys can either be header regexps, or @code{t}.
453
454 The values can be either @code{nil}, in which case the header(s) in
455 question won't be encoded, or @code{mime}, which means that they will be
456 encoded.
457
458 @item rfc2047-charset-encoding-alist
459 @vindex rfc2047-charset-encoding-alist
460 RFC2047 specifies two forms of encoding---@code{Q} (a
461 Quoted-Printable-like encoding) and @code{B} (base64).  This alist
462 specifies which charset should use which encoding.
463
464 @item rfc2047-encoding-function-alist
465 @vindex rfc2047-encoding-function-alist
466 This is an alist of encoding / function pairs.  The encodings are
467 @code{Q}, @code{B} and @code{nil}.
468
469 @item rfc2047-q-encoding-alist
470 @vindex rfc2047-q-encoding-alist
471 The @code{Q} encoding isn't quite the same for all headers.  Some
472 headers allow a narrower range of characters, and that is what this
473 variable is for.  It's an alist of header regexps / allowable character
474 ranges.
475
476 @item rfc2047-encoded-word-regexp
477 @vindex rfc2047-encoded-word-regexp
478 When decoding words, this library looks for matches to this regexp.
479
480 @end table
481
482 Those were the variables, and these are this functions:
483
484 @table @code
485 @item rfc2047-narrow-to-field
486 @findex rfc2047-narrow-to-field
487 Narrow the buffer to the header on the current line.
488
489 @item rfc2047-encode-message-header
490 @findex rfc2047-encode-message-header
491 Should be called narrowed to the header of a message.  Encodes according
492 to @code{rfc2047-header-encoding-alist}.
493
494 @item rfc2047-encode-region
495 @findex rfc2047-encode-region
496 Encodes all encodable words in the region specified.
497
498 @item rfc2047-encode-string
499 @findex rfc2047-encode-string
500 Encode a string and return the results.
501
502 @item rfc2047-decode-region
503 @findex rfc2047-decode-region
504 Decode the encoded words in the region.
505
506 @item rfc2047-decode-string
507 @findex rfc2047-decode-string
508 Decode a string and return the results.
509
510 @end table
511
512
513 @node time-date
514 @section time-date
515
516 While not really a part of the @sc{mime} library, it is convenient to
517 document this library here.  It deals with parsing @code{Date} headers
518 and manipulating time.  (Not by using tesseracts, though, I'm sorry to
519 say.)
520
521 These functions convert between five formats: A date string, an Emacs
522 time structure, a decoded time list, a second number, and a day number.
523
524 Here's a bunch of time/date/second/day examples:
525
526 @example
527 (parse-time-string "Sat Sep 12 12:21:54 1998 +0200")
528 @result{} (54 21 12 12 9 1998 6 nil 7200)
529
530 (date-to-time "Sat Sep 12 12:21:54 1998 +0200")
531 @result{} (13818 19266)
532
533 (time-to-seconds '(13818 19266))
534 @result{} 905595714.0
535
536 (seconds-to-time 905595714.0)
537 @result{} (13818 19266 0)
538
539 (time-to-days '(13818 19266))
540 @result{} 729644
541
542 (days-to-time 729644)
543 @result{} (961933 65536)
544
545 (time-since '(13818 19266))
546 @result{} (0 430)
547
548 (time-less-p '(13818 19266) '(13818 19145))
549 @result{} nil
550
551 (subtract-time '(13818 19266) '(13818 19145))
552 @result{} (0 121)
553
554 (days-between "Sat Sep 12 12:21:54 1998 +0200"
555               "Sat Sep 07 12:21:54 1998 +0200")
556 @result{} 5
557
558 (date-leap-year-p 2000)
559 @result{} t
560
561 (time-to-day-in-year '(13818 19266))
562 @result{} 255
563
564 (time-to-number-of-days
565  (time-since
566   (date-to-time "Mon, 01 Jan 2001 02:22:26 GMT")))
567 @result{} 4.146122685185185
568 @end example
569
570 And finally, we have @code{safe-date-to-time}, which does the same as
571 @code{date-to-time}, but returns a zero time if the date is
572 syntactically malformed.
573
574 The five data representations used are the following:
575
576 @table @var
577 @item date
578 An RFC822 (or similar) date string.  For instance: @code{"Sat Sep 12
579 12:21:54 1998 +0200"}.
580
581 @item time
582 An internal Emacs time.  For instance: @code{(13818 26466)}.
583
584 @item seconds
585 A floating point representation of the internal Emacs time.  For
586 instance: @code{905595714.0}.
587
588 @item days
589 An integer number representing the number of days since 00000101.  For
590 instance: @code{729644}.
591
592 @item decoded time
593 A list of decoded time.  For instance: @code{(54 21 12 12 9 1998 6 t
594 7200)}.
595 @end table
596
597 All the examples above represent the same moment.
598
599 These are the functions available:
600
601 @table @code
602 @item date-to-time
603 Take a date and return a time.
604
605 @item time-to-seconds
606 Take a time and return seconds.
607
608 @item seconds-to-time
609 Take seconds and return a time.
610
611 @item time-to-days
612 Take a time and return days.
613
614 @item days-to-time
615 Take days and return a time.
616
617 @item date-to-day
618 Take a date and return days.
619
620 @item time-to-number-of-days
621 Take a time and return the number of days that represents.
622
623 @item safe-date-to-time
624 Take a date and return a time.  If the date is not syntactically valid,
625 return a "zero" date.
626
627 @item time-less-p
628 Take two times and say whether the first time is less (i. e., earlier)
629 than the second time.
630
631 @item time-since
632 Take a time and return a time saying how long it was since that time.
633
634 @item subtract-time
635 Take two times and subtract the second from the first.  I. e., return
636 the time between the two times.
637
638 @item days-between
639 Take two days and return the number of days between those two days.
640
641 @item date-leap-year-p
642 Take a year number and say whether it's a leap year.
643
644 @item time-to-day-in-year
645 Take a time and return the day number within the year that the time is
646 in. 
647
648 @end table
649
650
651 @node qp
652 @section qp
653
654 This library deals with decoding and encoding Quoted-Printable text.
655
656 Very briefly explained, qp encoding means translating all 8-bit
657 characters (and lots of control characters) into things that look like
658 @samp{=EF}; that is, an equal sign followed by the byte encoded as a hex
659 string.
660
661 The following functions are defined by the library:
662
663 @table @code
664 @item quoted-printable-decode-region
665 @findex quoted-printable-decode-region
666 QP-decode all the encoded text in the specified region.
667
668 @item quoted-printable-decode-string
669 @findex quoted-printable-decode-string
670 Decode the QP-encoded text in a string and return the results.
671
672 @item quoted-printable-encode-region
673 @findex quoted-printable-encode-region
674 QP-encode all the encodable characters in the specified region.  The third
675 optional parameter @var{fold} specifies whether to fold long lines.
676 (Long here means 72.)
677
678 @item quoted-printable-encode-string
679 @findex quoted-printable-encode-string
680 QP-encode all the encodable characters in a string and return the
681 results.
682
683 @end table
684
685
686 @node base64
687 @section base64
688 @cindex base64
689
690 Base64 is an encoding that encodes three bytes into four characters,
691 thereby increasing the size by about 33%.  The alphabet used for
692 encoding is very resistant to mangling during transit.
693
694 The following functions are defined by this library:
695
696 @table @code
697 @item base64-encode-region
698 @findex base64-encode-region
699 base64 encode the selected region.  Return the length of the encoded
700 text.  Optional third argument @var{no-line-break} means do not break
701 long lines into shorter lines.
702
703 @item base64-encode-string
704 @findex base64-encode-string
705 base64 encode a string and return the result.
706
707 @item base64-decode-region
708 @findex base64-decode-region
709 base64 decode the selected region.  Return the length of the decoded
710 text.  If the region can't be decoded, return @code{nil} and don't
711 modify the buffer.
712
713 @item base64-decode-string
714 @findex base64-decode-string
715 base64 decode a string and return the result.  If the string can't be
716 decoded, @code{nil} is returned.
717
718 @end table
719
720
721 @node binhex
722 @section binhex
723 @cindex binhex
724 @cindex Apple
725 @cindex Macintosh
726
727 @code{binhex} is an encoding that originated in Macintosh environments.
728 The following function is supplied to deal with these:
729
730 @table @code
731 @item binhex-decode-region
732 @findex binhex-decode-region
733 Decode the encoded text in the region.  If given a third parameter, only
734 decode the @code{binhex} header and return the filename.
735
736 @end table
737
738
739 @node uudecode
740 @section uudecode
741 @cindex uuencode
742 @cindex uudecode
743
744 @code{uuencode} is probably still the most popular encoding of binaries
745 used on Usenet, although @code{base64} rules the mail world.
746
747 The following function is supplied by this package:
748
749 @table @code
750 @item uudecode-decode-region
751 @findex uudecode-decode-region
752 Decode the text in the region.
753 @end table
754
755
756 @node rfc1843
757 @section rfc1843
758 @cindex rfc1843
759 @cindex HZ
760 @cindex Chinese
761
762 RFC1843 deals with mixing Chinese and ASCII characters in messages.  In
763 essence, RFC1843 switches between ASCII and Chinese by doing this:
764
765 @example
766 This sentence is in ASCII.
767 The next sentence is in GB.~@{<:Ky2;S@{#,NpJ)l6HK!#~@}Bye.
768 @end example
769
770 Simple enough, and widely used in China.
771
772 The following functions are available to handle this encoding:
773
774 @table @code
775 @item rfc1843-decode-region
776 Decode HZ-encoded text in the region.
777
778 @item rfc1843-decode-string
779 Decode a HZ-encoded string and return the result.
780
781 @end table
782
783
784 @node mailcap
785 @section mailcap
786
787 The @file{~/.mailcap} file is parsed by most @sc{mime}-aware message
788 handlers and describes how elements are supposed to be displayed.
789 Here's an example file:
790
791 @example
792 image/*; gimp -8 %s
793 audio/wav; wavplayer %s
794 @end example
795
796 This says that all image files should be displayed with @code{gimp}, and
797 that WAVE audio files should be played by @code{wavplayer}.
798
799 The @code{mailcap} library parses this file, and provides functions for
800 matching types.
801
802 @table @code
803 @item mailcap-mime-data
804 @vindex mailcap-mime-data
805 This variable is an alist of alists containing backup viewing rules.
806
807 @end table
808
809 Interface functions:
810
811 @table @code
812 @item mailcap-parse-mailcaps
813 @findex mailcap-parse-mailcaps
814 Parse the @code{~/.mailcap} file.
815
816 @item mailcap-mime-info
817 Takes a @sc{mime} type as its argument and returns the matching viewer.
818
819 @end table
820
821
822
823
824 @node Decoding and Viewing
825 @chapter Decoding and Viewing
826
827 This chapter deals with decoding and viewing @sc{mime} messages on a
828 higher level.
829
830 The main idea is to first analyze a @sc{mime} article, and then allow
831 other programs to do things based on the list of @dfn{handles} that are
832 returned as a result of this analysis.
833
834 @menu
835 * Dissection::     Analyzing a @sc{mime} message.
836 * Non-MIME::       Analyzing a non-@sc{mime} message.
837 * Handles::        Handle manipulations.
838 * Display::        Displaying handles.
839 * Customization::  Variables that affect display.
840 * New Viewers::    How to write your own viewers.
841 @end menu
842
843
844 @node Dissection
845 @section Dissection
846
847 The @code{mm-dissect-buffer} is the function responsible for dissecting
848 a @sc{mime} article.  If given a multipart message, it will recursively
849 descend the message, following the structure, and return a tree of
850 @sc{mime} handles that describes the structure of the message.
851
852 @node Non-MIME
853 @section Non-MIME
854
855 Gnus also understands some non-MIME attachments, such as postscript,
856 uuencode, binhex, shar, forward, gnatsweb, pgp.  Each of these features
857 can be disabled by add an item into @code{mm-uu-configure-list}.
858 For example,
859
860 @lisp
861 (require 'mm-uu)
862 (add-to-list 'mm-uu-configure-list '(pgp-signed . disabled))
863 @end lisp
864
865 @table @code
866 @item postscript
867 @findex postscript
868 Postscript file.
869
870 @item uu
871 @findex uu
872 Uuencoded file.
873
874 @item binhex
875 @findex binhex
876 Binhex encoded file.
877
878 @item shar
879 @findex shar
880 Shar archive file.
881
882 @item forward
883 @findex forward
884 Non-@sc{mime} forwarded message.
885
886 @item gnatsweb
887 @findex gnatsweb
888 Gnatsweb attachment.
889
890 @item pgp-signed
891 @findex pgp-signed
892 PGP signed clear text.
893
894 @item pgp-encrypted
895 @findex pgp-encrypted
896 PGP encrypted clear text.
897
898 @item pgp-key
899 @findex pgp-key
900 PGP public keys.
901
902 @item emacs-sources
903 @findex emacs-sources
904 Emacs source code.  This item works only in the groups matching
905 @code{mm-uu-emacs-sources-regexp}.
906
907 @end table
908
909 @node Handles
910 @section Handles
911
912 A @sc{mime} handle is a list that fully describes a @sc{mime}
913 component.
914
915 The following macros can be used to access elements in a handle:
916
917 @table @code
918 @item mm-handle-buffer
919 @findex mm-handle-buffer
920 Return the buffer that holds the contents of the undecoded @sc{mime}
921 part.
922
923 @item mm-handle-type
924 @findex mm-handle-type
925 Return the parsed @code{Content-Type} of the part.
926
927 @item mm-handle-encoding
928 @findex mm-handle-encoding
929 Return the @code{Content-Transfer-Encoding} of the part.
930
931 @item mm-handle-undisplayer
932 @findex mm-handle-undisplayer
933 Return the object that can be used to remove the displayed part (if it
934 has been displayed).
935
936 @item mm-handle-set-undisplayer
937 @findex mm-handle-set-undisplayer
938 Set the undisplayer object.
939
940 @item mm-handle-disposition
941 @findex mm-handle-disposition
942 Return the parsed @code{Content-Disposition} of the part.
943
944 @item mm-handle-disposition
945 @findex mm-handle-disposition
946 Return the description of the part.
947
948 @item mm-get-content-id
949 Returns the handle(s) referred to by @code{Content-ID}.
950
951 @end table
952
953
954 @node Display
955 @section Display
956
957 Functions for displaying, removing and saving.
958
959 @table @code
960 @item mm-display-part
961 @findex mm-display-part
962 Display the part.
963
964 @item mm-remove-part
965 @findex mm-remove-part
966 Remove the part (if it has been displayed).
967
968 @item mm-inlinable-p
969 @findex mm-inlinable-p
970 Say whether a @sc{mime} type can be displayed inline.
971
972 @item mm-automatic-display-p
973 @findex mm-automatic-display-p
974 Say whether a @sc{mime} type should be displayed automatically.
975
976 @item mm-destroy-part
977 @findex mm-destroy-part
978 Free all resources occupied by a part.
979
980 @item mm-save-part
981 @findex mm-save-part
982 Offer to save the part in a file.
983
984 @item mm-pipe-part
985 @findex mm-pipe-part
986 Offer to pipe the part to some process.
987
988 @item mm-interactively-view-part
989 @findex mm-interactively-view-part
990 Prompt for a mailcap method to use to view the part.
991
992 @end table
993
994
995 @node Customization
996 @section Customization
997
998 @table @code
999
1000 @item mm-inline-media-tests
1001 This is an alist where the key is a @sc{mime} type, the second element
1002 is a function to display the part @dfn{inline} (i.e., inside Emacs), and 
1003 the third element is a form to be @code{eval}ed to say whether the part
1004 can be displayed inline.
1005
1006 This variable specifies whether a part @emph{can} be displayed inline,
1007 and, if so, how to do it.  It does not say whether parts are
1008 @emph{actually} displayed inline.
1009
1010 @item mm-inlined-types
1011 This, on the other hand, says what types are to be displayed inline, if
1012 they satisfy the conditions set by the variable above.  It's a list of
1013 @sc{mime} media types.
1014
1015 @item mm-automatic-display
1016 This is a list of types that are to be displayed ``automatically'', but
1017 only if the above variable allows it.  That is, only inlinable parts can
1018 be displayed automatically.
1019
1020 @item mm-attachment-override-types
1021 Some @sc{mime} agents create parts that have a content-disposition of
1022 @samp{attachment}.  This variable allows overriding that disposition and 
1023 displaying the part inline.  (Note that the disposition is only
1024 overridden if we are able to, and want to, display the part inline.)
1025
1026 @item mm-discouraged-alternatives
1027 List of @sc{mime} types that are discouraged when viewing
1028 @samp{multipart/alternative}.  Viewing agents are supposed to view the
1029 last possible part of a message, as that is supposed to be the richest.
1030 However, users may prefer other types instead, and this list says what
1031 types are most unwanted.  If, for instance, @samp{text/html} parts are
1032 very unwanted, and @samp{text/richtech} parts are somewhat unwanted,
1033 you could say something like:
1034
1035 @lisp
1036 (setq mm-discouraged-alternatives
1037       '("text/html" "text/richtext")
1038       mm-automatic-display
1039       (remove "text/html" mm-automatic-display))
1040 @end lisp
1041
1042 @item mm-inline-large-images-p
1043 When displaying inline images that are larger than the window, XEmacs
1044 does not enable scrolling, which means that you cannot see the whole
1045 image.  To prevent this, the library tries to determine the image size
1046 before displaying it inline, and if it doesn't fit the window, the
1047 library will display it externally (e.g. with @samp{ImageMagick} or
1048 @samp{xv}).  Setting this variable to @code{t} disables this check and
1049 makes the library display all inline images as inline, regardless of
1050 their size.
1051
1052 @item mm-inline-override-p
1053 @code{mm-inlined-types} may include regular expressions, for example to
1054 specify that all @samp{text/.*} parts be displayed inline.  If a user
1055 prefers to have a type that matches such a regular expression be treated
1056 as an attachment, that can be accomplished by setting this variable to a
1057 list containing that type.  For example assuming @code{mm-inlined-types}
1058 includes @samp{text/.*}, then including @samp{text/html} in this
1059 variable will cause @samp{text/html} parts to be treated as attachments.
1060
1061 @end table
1062
1063
1064 @node New Viewers
1065 @section New Viewers
1066
1067 Here's an example viewer for displaying @code{text/enriched} inline:
1068
1069 @lisp
1070 (defun mm-display-enriched-inline (handle)
1071   (let (text)
1072     (with-temp-buffer
1073       (mm-insert-part handle)
1074       (save-window-excursion
1075         (enriched-decode (point-min) (point-max))
1076         (setq text (buffer-string))))
1077     (mm-insert-inline handle text)))
1078 @end lisp
1079
1080 We see that the function takes a @sc{mime} handle as its parameter.  It
1081 then goes to a temporary buffer, inserts the text of the part, does some 
1082 work on the text, stores the result, goes back to the buffer it was
1083 called from and inserts the result.
1084
1085 The two important helper functions here are @code{mm-insert-part} and
1086 @code{mm-insert-inline}.  The first function inserts the text of the
1087 handle in the current buffer.  It handles charset and/or content
1088 transfer decoding.  The second function just inserts whatever text you
1089 tell it to insert, but it also sets things up so that the text can be
1090 ``undisplayed' in a convenient manner.
1091
1092
1093 @node Composing
1094 @chapter Composing
1095 @cindex Composing
1096 @cindex MIME Composing
1097 @cindex MML
1098 @cindex MIME Meta Language
1099
1100 Creating a @sc{mime} message is boring and non-trivial.  Therefore, a
1101 library called @code{mml} has been defined that parses a language called
1102 MML (@sc{mime} Meta Language) and generates @sc{mime} messages.
1103
1104 @findex mml-generate-mime
1105 The main interface function is @code{mml-generate-mime}.  It will
1106 examine the contents of the current (narrowed-to) buffer and return a
1107 string containing the @sc{mime} message.
1108
1109 @menu
1110 * Simple MML Example::             An example MML document.
1111 * MML Definition::                 All valid MML elements.
1112 * Advanced MML Example::           Another example MML document.
1113 * Charset Translation::            How charsets are mapped from @sc{mule} to MIME.
1114 * Conversion::                     Going from @sc{mime} to MML and vice versa.
1115 @end menu
1116
1117
1118 @node Simple MML Example
1119 @section Simple MML Example
1120
1121 Here's a simple @samp{multipart/alternative}:
1122
1123 @example
1124 <#multipart type=alternative>
1125 This is a plain text part.
1126 <#part type=text/enriched>
1127 <center>This is a centered enriched part</center>
1128 <#/multipart>
1129 @end example
1130
1131 After running this through @code{mml-generate-mime}, we get this:
1132
1133 @example
1134 Content-Type: multipart/alternative; boundary="=-=-="
1135
1136
1137 --=-=-=
1138
1139
1140 This is a plain text part.
1141
1142 --=-=-=
1143 Content-Type: text/enriched
1144
1145
1146 <center>This is a centered enriched part</center>
1147
1148 --=-=-=--
1149 @end example
1150
1151
1152 @node MML Definition
1153 @section MML Definition
1154
1155 The MML language is very simple.  It looks a bit like an SGML
1156 application, but it's not.
1157
1158 The main concept of MML is the @dfn{part}.  Each part can be of a
1159 different type or use a different charset.  The way to delineate a part
1160 is with a @samp{<#part ...>} tag.  Multipart parts can be introduced
1161 with the @samp{<#multipart ...>} tag.  Parts are ended by the
1162 @samp{<#/part>} or @samp{<#/multipart>} tags.  Parts started with the
1163 @samp{<#part ...>} tags are also closed by the next open tag.
1164
1165 There's also the @samp{<#external ...>} tag.  These introduce
1166 @samp{external/message-body} parts.
1167
1168 Each tag can contain zero or more parameters on the form
1169 @samp{parameter=value}.  The values may be enclosed in quotation marks,
1170 but that's not necessary unless the value contains white space.  So
1171 @samp{filename=/home/user/#hello$^yes} is perfectly valid.
1172
1173 The following parameters have meaning in MML; parameters that have no
1174 meaning are ignored.  The MML parameter names are the same as the
1175 @sc{mime} parameter names; the things in the parentheses say which
1176 header it will be used in.
1177
1178 @table @samp
1179 @item type
1180 The @sc{mime} type of the part (@code{Content-Type}).
1181
1182 @item filename
1183 Use the contents of the file in the body of the part
1184 (@code{Content-Disposition}).
1185
1186 @item charset
1187 The contents of the body of the part are to be encoded in the character
1188 set speficied (@code{Content-Type}).
1189
1190 @item name
1191 Might be used to suggest a file name if the part is to be saved
1192 to a file (@code{Content-Type}).
1193
1194 @item disposition
1195 Valid values are @samp{inline} and @samp{attachment}
1196 (@code{Content-Disposition}).
1197
1198 @item encoding
1199 Valid values are @samp{7bit}, @samp{8bit}, @samp{quoted-printable} and
1200 @samp{base64} (@code{Content-Transfer-Encoding}).
1201
1202 @item description
1203 A description of the part (@code{Content-Description}).
1204
1205 @item creation-date
1206 RFC822 date when the part was created (@code{Content-Disposition}).
1207
1208 @item modification-date
1209 RFC822 date when the part was modified (@code{Content-Disposition}).
1210
1211 @item read-date
1212 RFC822 date when the part was read (@code{Content-Disposition}).
1213
1214 @item size
1215 The size (in octets) of the part (@code{Content-Disposition}).
1216
1217 @item sign
1218 What technology to sign this MML part with (@code{smime}, @code{pgp}
1219 or @code{pgpmime})
1220
1221 @item encrypt
1222 What technology to encrypt this MML part with (@code{smime},
1223 @code{pgp} or @code{pgpmime})
1224
1225 @end table
1226
1227 Parameters for @samp{application/octet-stream}:
1228
1229 @table @samp
1230 @item type
1231 Type of the part; informal---meant for human readers
1232 (@code{Content-Type}).
1233 @end table
1234
1235 Parameters for @samp{message/external-body}:
1236
1237 @table @samp
1238 @item access-type
1239 A word indicating the supported access mechanism by which the file may
1240 be obtained.  Values include @samp{ftp}, @samp{anon-ftp}, @samp{tftp},
1241 @samp{localfile}, and @samp{mailserver}.  (@code{Content-Type}.)
1242
1243 @item expiration
1244 The RFC822 date after which the file may no longer be fetched.
1245 (@code{Content-Type}.)
1246
1247 @item size
1248 The size (in octets) of the file.  (@code{Content-Type}.)
1249
1250 @item permission
1251 Valid values are @samp{read} and @samp{read-write}
1252 (@code{Content-Type}).
1253
1254 @end table
1255
1256 Parameters for @samp{sign=smime}:
1257
1258 @table @samp
1259
1260 @item keyfile
1261 File containing key and certificate for signer.
1262
1263 @end table
1264
1265 Parameters for @samp{encrypt=smime}:
1266
1267 @table @samp
1268
1269 @item certfile
1270 File containing certificate for recipient.
1271
1272 @end table
1273
1274
1275 @node Advanced MML Example
1276 @section Advanced MML Example
1277
1278 Here's a complex multipart message.  It's a @samp{multipart/mixed} that
1279 contains many parts, one of which is a @samp{multipart/alternative}.
1280
1281 @example
1282 <#multipart type=mixed>
1283 <#part type=image/jpeg filename=~/rms.jpg disposition=inline>
1284 <#multipart type=alternative>
1285 This is a plain text part.
1286 <#part type=text/enriched name=enriched.txt>
1287 <center>This is a centered enriched part</center>
1288 <#/multipart>
1289 This is a new plain text part.
1290 <#part disposition=attachment>
1291 This plain text part is an attachment.
1292 <#/multipart>
1293 @end example
1294
1295 And this is the resulting @sc{mime} message:
1296
1297 @example
1298 Content-Type: multipart/mixed; boundary="=-=-="
1299
1300
1301 --=-=-=
1302
1303
1304
1305 --=-=-=
1306 Content-Type: image/jpeg;
1307  filename="~/rms.jpg"
1308 Content-Disposition: inline;
1309  filename="~/rms.jpg"
1310 Content-Transfer-Encoding: base64
1311
1312 /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
1313 Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAAwADABAREA/8QAHwAA
1314 AQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQR
1315 BRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RF
1316 RkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ip
1317 qrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEB
1318 AAA/AO/rifFHjldNuGsrDa0qcSSHkA+gHrXKw+LtWLrMb+RgTyhbr+HSug07xNqV9fQtZrNI
1319 AyiaE/NuBPOOOP0rvRNE880KOC8TbXXGCv1FPqjrF4LDR7u5L7SkTFT/ALWOP1xXgTuXfc7E
1320 sx6nua6rwp4IvvEM8chCxWxOdzn7wz6V9AaB4S07w9p5itow0rDLSY5Pt9K43xO66P4xs71m
1321 2QXiGCbA4yOVJ9+1aYORkdK434lyNH4ahCnG66VT9Nj15JFbPdX0MS43M4VQf5/yr2vSpLnw
1322 5ZW8dlCZ8KFXjOPX0/mK6rSPEGt3Angu44fNEReHYNvIH3TzXDeKNO8RX+kSX2ouZkicTIOc
1323 L+g7E810ulFjpVtv3bwgB3HJyK5L4quY/C9sVxk3ij/xx6850u7t1mtp/wDlpEw3An3Jr3Dw
1324 34gsbWza4nBlhC5LDsaW6+IFgupQyCF3iHH7gA7c9R9ay7zx6t7aX9jHC4smhfBkGCvHGfrm
1325 tLQ7hbnRrV1GPkAP1x1/Hr+Ncr8Vzjwrbf8AX6v/AKA9eQRyYlQk8Yx9K6XTNbkgia2ciSIn
1326 7p5Ga9Atte0LTLKO6it4i7dVRFJDcZ4PvXN+JvEMF9bILVGXJLSZ4zkjivRPDaeX4b08HOTC
1327 pOffmua+KkbS+GLVUGT9tT/0B68eeIpIFYjB70+OOVXyoOM9+M1eaWeCLzHPyHGO/NVWvJJm
1328 jQ8KGH1NfQWhXSXmh2c8eArRLwO3HSv/2Q==
1329
1330 --=-=-=
1331 Content-Type: multipart/alternative; boundary="==-=-="
1332
1333
1334 --==-=-=
1335
1336
1337 This is a plain text part.
1338
1339 --==-=-=
1340 Content-Type: text/enriched;
1341  name="enriched.txt"
1342
1343
1344 <center>This is a centered enriched part</center>
1345
1346 --==-=-=--
1347
1348 --=-=-=
1349
1350 This is a new plain text part.
1351
1352 --=-=-=
1353 Content-Disposition: attachment
1354
1355
1356 This plain text part is an attachment.
1357
1358 --=-=-=--
1359 @end example
1360
1361 @node Charset Translation
1362 @section Charset Translation
1363 @cindex charsets
1364
1365 During translation from MML to @sc{mime}, for each @sc{mime} part which
1366 has been composed inside Emacs, an appropriate charset has to be chosen.
1367
1368 @vindex mail-parse-charset
1369 If you are running a non-@sc{mule} Emacs, this process is simple: If the
1370 part contains any non-ASCII (8-bit) characters, the @sc{mime} charset
1371 given by @code{mail-parse-charset} (a symbol) is used.  (Never set this
1372 variable directly, though.  If you want to change the default charset,
1373 please consult the documentation of the package which you use to process
1374 @sc{mime} messages.
1375 @xref{Various Message Variables, , Various Message Variables, message, 
1376       Message Manual}, for example.)
1377 If there are only ASCII characters, the @sc{mime} charset US-ASCII is
1378 used, of course.
1379
1380 @cindex MULE
1381 @cindex UTF-8
1382 @cindex Unicode
1383 @vindex mm-mime-mule-charset-alist
1384 Things are slightly more complicated when running Emacs with @sc{mule}
1385 support.  In this case, a list of the @sc{mule} charsets used in the
1386 part is obtained, and the @sc{mule} charsets are translated to @sc{mime}
1387 charsets by consulting the variable @code{mm-mime-mule-charset-alist}.
1388 If this results in a single @sc{mime} charset, this is used to encode
1389 the part.  But if the resulting list of @sc{mime} charsets contains more
1390 than one element, two things can happen: If it is possible to encode the
1391 part via UTF-8, this charset is used.  (For this, Emacs must support
1392 the @code{utf-8} coding system, and the part must consist entirely of
1393 characters which have Unicode counterparts.)  If UTF-8 is not available
1394 for some reason, the part is split into several ones, so that each one
1395 can be encoded with a single @sc{mime} charset.  The part can only be
1396 split at line boundaries, though---if more than one @sc{mime} charset is
1397 required to encode a single line, it is not possible to encode the part.
1398
1399 @node Conversion
1400 @section Conversion
1401
1402 @findex mime-to-mml
1403 A (multipart) @sc{mime} message can be converted to MML with the
1404 @code{mime-to-mml} function.  It works on the message in the current
1405 buffer, and substitutes MML markup for @sc{mime} boundaries.
1406 Non-textual parts do not have their contents in the buffer, but instead
1407 have the contents in separate buffers that are referred to from the MML
1408 tags.
1409
1410 @findex mml-to-mime
1411 An MML message can be converted back to @sc{mime} by the
1412 @code{mml-to-mime} function.
1413
1414 These functions are in certain senses ``lossy''---you will not get back
1415 an identical message if you run @sc{mime-to-mml} and then
1416 @sc{mml-to-mime}.  Not only will trivial things like the order of the
1417 headers differ, but the contents of the headers may also be different.
1418 For instance, the original message may use base64 encoding on text,
1419 while @sc{mml-to-mime} may decide to use quoted-printable encoding, and
1420 so on.
1421
1422 In essence, however, these two functions should be the inverse of each
1423 other.  The resulting contents of the message should remain equivalent,
1424 if not identical.
1425
1426
1427 @node Standards
1428 @chapter Standards
1429
1430 The Emacs @sc{mime} library implements handling of various elements
1431 according to a (somewhat) large number of RFCs, drafts and standards
1432 documents.  This chapter lists the relevant ones.  They can all be
1433 fetched from @uref{http://quimby.gnus.org/notes/}.
1434
1435 @table @dfn
1436 @item RFC822
1437 @itemx STD11
1438 Standard for the Format of ARPA Internet Text Messages.
1439
1440 @item RFC1036
1441 Standard for Interchange of USENET Messages
1442
1443 @item RFC2045
1444 Format of Internet Message Bodies
1445
1446 @item RFC2046
1447 Media Types
1448
1449 @item RFC2047
1450 Message Header Extensions for Non-ASCII Text
1451
1452 @item RFC2048
1453 Registration Procedures
1454
1455 @item RFC2049
1456 Conformance Criteria and Examples
1457
1458 @item RFC2231
1459 MIME Parameter Value and Encoded Word Extensions: Character Sets,
1460 Languages, and Continuations
1461
1462 @item RFC1843
1463 HZ - A Data Format for Exchanging Files of Arbitrarily Mixed Chinese and
1464 ASCII characters
1465
1466 @item draft-ietf-drums-msg-fmt-05.txt
1467 Draft for the successor of RFC822
1468
1469 @item RFC2112
1470 The MIME Multipart/Related Content-type
1471
1472 @item RFC1892
1473 The Multipart/Report Content Type for the Reporting of Mail System
1474 Administrative Messages
1475
1476 @item RFC2183
1477 Communicating Presentation Information in Internet Messages: The
1478 Content-Disposition Header Field
1479
1480 @end table
1481
1482
1483 @node Index
1484 @chapter Index
1485 @printindex cp
1486
1487 @summarycontents
1488 @contents
1489 @bye
1490
1491 \f
1492 @c Local Variables:
1493 @c mode: texinfo
1494 @c coding: iso-8859-1
1495 @c End: