Network Working Group Jacob Palme Internet Draft Stockholm University/KTH draft-ietf-mhtml-info-11.txt Category-to-be: Informational Expires: September 1998 March 1999 Sending HTML in MIME, an informational supplement to the RFC: MIME Encapsulation of Aggregate Documents, such as HTML (MHTML) Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet- Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Copyright (C) The Internet Society 1998. All Rights Reserved. 1. Abstract The memo "MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" (draft-ietf-mhtml-rev-05.txt) specifies how to send packaged aggregate HTML objects in MIME format. This memo is an accompanying informational document, intended to be an aid to developers. This document is not an Internet standard. Issues discussed are implementation methods, caching strategies, problems with rewriting of URIs, making messages suitable both for mailers which can and which cannot handle Multipart/related and handling recipients which do not have full Internet connectivity. The latest version of this document is available in HTML format at: http://www.dsv.su.se/~jpalme/ietf/mhtml-info.html Differences from the previous versions 9 and 10 of this draft (1) A paragraph about one disadvantage with MAILTO action elements has been added to section 10. (2) A new section 13: Default font size has been added (3) A new temporary section "Issue list" immediately below has been added Issue list Section in Issue description this draft 4 Should some more method of communication between html viewer and e-mail program be described? Are the methods correctly described? 5 Are there any more problems with rewriting URIs which should be described in section 5? 8 Is it OK to say that senders should not assume that recipients will show the value of Content-Description inside Multipart/Related (since HTML has other methods of showing this, for example the
And here is the IETF logo with transparent background:
--boundary-example-1
Content-Location: ietflogo.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc...
--boundary-example-1--
.
Saving the above message as text might give the following file:
From: Alice
And here is the IETF logo with transparent background:
Saving the same text as aggregate might give the following file
From: Alice
And here is the IETF logo with transparent background:
--boundary-example-1
Content-Location: ietflogo.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc...
--boundary-example-1--
Saving the same text as archiving aggregate might give the following file
(where the missing body part is fetched through http and added to the
saved file):
From: Alice
And here is the IETF logo with transparent background:
--boundary-example-1
Content-Location: ietflogo.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc...
--boundary-example-1
Content-Location: ietflogo2e.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgANX/ACkpKTExMTk5OUJCQkpKSlJSUlpaWmNjY2tra3Nzc3t7e4
SEhIyMjJSUlJycnKWlpa2trbW1tcDAwM7Ozv/eQnNzjHNzlGtrjGNjhFpae1pa
etc...
--boundary-example-1--
Saving the same message as message might give the following file:
from:
And here is the IETF logo with transparent background:
--boundary-example-1
Content-Location: ietflogo.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc...
--boundary-example-1--
--boundary-example-2--
8. Recipients which cannot handle the Multipart/related Content-Type
A message sent according to the specifications in [MHTML] may have
recipients, whose mailers cannot handle the Multipart/related
Content-Type in the way specified in [MHTML].
According to [MIME1] a mailer which encounters an unknown subtype to
Multipart, should handle this as Multipart/mixed.
To improve this, Multipart/alternative can be used as discussed in
section 9 of this memo.
Content-Disposition, as specified in [CONDISP] and in [MHTML], section
10, can also be used as an aid to mailers which do not understand
Multipart/related.
Captions on images, which are included in the HTML text, might for
non-HTML-capable recipients be found in the Content-Description header
[CONDISP]. Do not assume, however, that HTML-capable user agents will
display the Content-Description header, they may assume that this
information is included in the HTML text instead.
9. Use of the Content-Type: Multipart/alternative
If the message is sent to recipients, all of which may not have mailers
capable of handling the Text/HTML content-type, then the "Content-Type:
Multipart/Alternative" [MIME1] can be used in two ways:
9.1 Multipart/alternative inside Multipart/related
The Multipart/alternative is put inside the "Content-Type
Multipart/related", body parts can be specified with "Content-Type:
Text/plain" as the first choice, and "Content-Type: Text/HTML" as the
second choice.
Example:
Content-Type: Multipart/related; boundary="boundary-example-1";
type=MULTIPART/ALTERNATIVE
--boundary-example 1
Content-Type: MULTIPART/ALTERNATIVE
Boundary: boundary-example-2
--boundary-example-2
Content-Type: Text/plain
... plain text version of the document for recipients
whose mailers cannot handle Text/HTML ...
--boundary-example-2
Content-Type: Text/HTML; charset=US-ASCII
Content-ID: content-id-example@example.host
... text of the HTML document ...
--boundary-example-2--
--boundary-example-1
Content-Type: Image/GIF
... a body part, to which the HTML document has a link ...
--boundary-example-1--
Note that the type parameter of Multipart/related in this case should be
Multipart/alternative and not Text/HTML.
9.2 Multipart/alternative outside Multipart/related
The multipart/alternative is put outside the Multipart/Related, with
Multipart/Related as one alternative and Multipart/Mixed as the other
alternative. Note however that the [MHTML] does not recommend links from
inside Multipart/Related to objects outside of the Multipart/Related, so
putting inline images outside the Multipart/Related is not suitable.
Instead, such inline images may have to repeated in both branches of the
multipart/alternative with this method.
Example:
Content-Type: MULTIPART/ALTERNATIVE
Boundary: boundary-example-1
--boundary-example-1
Content-Type: Multipart/mixed; boundary="boundary-example-3"
--boundary-example-3
Content-Type: Text/plain; charset=US-ASCII
... plain text version of the message for recipients
whose mailers cannot handle Text/HTML ...
--boundary-example-3
Content-Type: Image/GIF
... A picture associated with the plain text message ...
--boundary-example-3--
--boundary-example-1
Content-Type: Multipart/related; boundary="boundary-example-1";
type=Text/HTML
--boundary-example 2
Content-Type: Text/HTML; charset=US-ASCII
Content-ID: content-id-example@example.host
... text of the HTML document ...
--boundary-example-2
Content-Type: Image/GIF
... a body part, to which the HTML document has a link ...
--boundary-example-2--
--boundary-example-1--
9.3 Comparing the two methods
When choosing between these two methods of employing
multipart/alternative, note the following:
(1) Clients which do not support Multipart/related, and which thus will
interpret it as Multipart/mixed, will with choice 9.1 display
the inline objects. Thus, a recipient whose mailer can handle
image/gif but not multipart/related will still be shown the images,
they will not be suppressed by being inside a suppressed branch of
the Multipart/alternative.
(2) Choice 9.2 will not show inline images in the Multipart/Related,
unless this information is repeated in both branches of the
Multipart/Alternative.
A general warning: Some mailers do not support "Content-Type:
Multipart/alternative", and may then interpret it as Multipart/mixed,
even though support of multipart/alternative is required for MIME
conformance.
9.4 Reducing the download time
If a message is sent as multipart/alternative, this would normally mean
that the mail client downloads both variants, and then shows only one of
the to the user. This will thus increase the download time. A way of
avoiding this problem is to use the FETCH command of IMAP, which allows a
client to download only certain body parts from a multipart message.
10. Textual alternatives to HTML forms
One important usage of HTML in e-mail is to send forms, which the
recipients fill in and return. It is then problematic how to handle
recipients whose mailers do not support HTML. One way is to use textual
encoding of the forms. This encoding is done so that the user action
needed to send in the form is made simple also for those who have only
textual e-mail systems. Important is that the textual users are not
forced to write complex commands in special command languages. Instead,
the form should be written so that the user need only make simple
changes to the form before sending it back, like deleting or adding
single characters.
Below is an example which shows how this can be done. The main
principle is that every line beginning with ";" is an explanation for
the reader, and every line beginning with "!" is a text, which the user
can convert into a command by just deleting the "!" in front of the
line.
The users will thus have to learn a very simple rule of filling in
forms: Just delete the "!" in front of your selections.
Technically, the recipient of a filled-in textual form should regard
all lines beginning with ";" or "!" as comment, and interpret all other
lines as commands.
10.1 Form in HTML format