In the case of multiple part messages,in which one or more differentsets of data are combined ina single body, a 'multipart' Content-Typefield must appear in the entity's header. The body must then containone or more 'body parts,' eachpreceded by an encapsulation boundary,and the last one followed by a closing boundary. Each part startswith an encapsulation boundary,and then contains a body part consisting of header area, ablank line, and a body area. Thusa body part is similar to an RFC822 message in syntax, but differentin meaning. ![Html mime types vsdx Html mime types vsdx](/uploads/1/1/8/6/118686555/606502872.png)
All subtypes of 'multipart' sharea common syntax, defined in this section. A simple example of amultipart message also appearsin this section. An example of amore complex multipart messageis given in Appendix C.
- Html Mime Type W3schools
- Html Mime Types Pokemon
- Text Html Mime Type
- Html Mime Types
- Html Mime Types Crossword Clue
![Html mime types vsdx Html mime types vsdx](/uploads/1/1/8/6/118686555/606502872.png)
A body part is NOT to be interpretedas actually being an RFC 822message. To begin with, NO headerfields are actually required inbody parts. A body part that starts with a blank line, therefore,is allowed and is a body part forwhich all default values are to beassumed. In such a case, theabsence of a Content-Type headerfield implies that the encapsulationis plain US-ASCII text. The only header fields that have definedmeaning for body parts are thosethe names of which begin with 'Content-'. All other header fields are generally to be ignored in bodyparts. Although they should generally be retained in mail processing, they may be discarded by gatewaysif necessary. Such other fieldsare permitted to appear in body parts but should not be depended on.'X-' fields may be created for experimental or private purposes,with the recognition that the informationthey contain may be lost at somegateways.
Two primary MIME types are important for the role of default types: text/plain is the default value for textual files. A textual file should be human-readable and must not contain binary. Application/octet-stream is the default value for all other cases. An unknown file type should use this type. 7.2 The Multipart Content-Type In the case of multiple part messages, in which one or more different sets of data are combined in a single body, a 'multipart' Content-Type field must appear in the entity's header. The type attribute specifies the Internet media type (formerly known as MIME type) of the linked document. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory.
The distinction between an RFC 822message and a body part is subtle,but important. A gateway betweenInternet and X.400 mail, for example,must be able to tell the difference between a body part that containsan image and a body part that containsan encapsulated message, the bodyof which is an image. In orderto represent the latter, the bodypart must have 'Content-Type: message',and its body (after the blankline) must be the encapsulated message,with its own 'Content-Type: image'header field. The use of similar syntax facilitates the conversionof messages to body parts, andvice versa, but the distinction betweenthe two must be understood byimplementors. (For the special casein which all parts actually aremessages, a 'digest' subtype is also defined.)
As stated previously, each bodypart is preceded by an encapsulationboundary. The encapsulation boundaryMUST NOT appear inside any of theencapsulated parts. Thus, it is crucial that the composing agent be able to choose and specifythe unique boundary that will separatethe parts.
All present and future subtypes ofthe 'multipart' type must use an identical syntax. Subtypes may differ in their semantics, andmay impose additional restrictionson syntax, but must conform tothe required syntax for the multipart type. This requirement ensuresthat all conformant user agentswill at least be able to recognizeand separate the parts of any multipart entity, even of an unrecognized subtype.
As stated in the definition of theContent-Transfer-Encoding field,no encoding other than '7bit', '8bit',or 'binary' is permitted for entitiesof type 'multipart'. The multipart delimiters and header fieldsare always 7-bit ASCII in any case,and data within the body parts canbe encoded on a part-by-partbasis, with Content-Transfer-Encodingfields for each appropriate bodypart.
Mail gateways, relays, and othermail handling agents are commonlyknown to alter the top-level headerof an RFC 822 message. In particular,they frequently add, remove, or reorder header fields. Suchalterations are explicitly forbiddenfor the body part headers embeddedin the bodies of messages oftype 'multipart.'
Html Mime Type W3schools
7.2.1 Multipart: The commonsyntax
![Html Mime Types Html Mime Types](/uploads/1/1/8/6/118686555/953256817.png)
The Content-Type field for multipartentities requires one parameter, 'boundary', which is used to specify the encapsulation boundary. The encapsulation boundary is defined as a line consisting entirely of two hyphen characters('-', decimal code 45) followed by the boundary parameter valuefrom the Content-Type header field.
NOTE: The hyphens are for roughcompatibility with the earlierRFC 934 method of message encapsulation,and for ease of searching for the boundaries in some implementations. However, it shouldbe noted that multipart messages are NOT completely compatible with RFC 934 encapsulations;in particular, they do not obeyRFC 934 quoting conventions forembedded lines that begin with hyphens. This mechanism waschosen over the RFC 934 mechanismbecause the latter causes lines togrow with each level of quoting.The combination of this growth withthe fact that SMTP implementationssometimes wrap long lines madethe RFC 934 mechanism unsuitablefor use in the event that deeply-nestedmultipart structuring is ever desired.
Thus, a typical multipart Content-Typeheader field might look likethis: This indicates that the entity consistsof several parts, each itselfwith a structure that is syntacticallyidentical to an RFC 822 message,except that the header area mightbe completely empty, and thatthe parts are each preceded by the line Note that the encapsulation boundarymust occur at the beginningof a line, i.e., following a CRLF,and that that initial CRLF is consideredto be part of the encapsulation boundary rather than part ofthe preceding part. The boundarymust be followed immediately eitherby another CRLF and the headerfields for the next part, or by twoCRLFs, in which case there areno header fields for the next part(and it is therefore assumed tobe of Content-Type text/plain).
NOTE: The CRLF preceding theencapsulation line is consideredpart of the boundary so that itis possible to have a part thatdoes not end with a CRLF (line break). Body parts that mustbe considered to end with line breaks, therefore, should have two CRLFspreceding the encapsulation line,the first of which is part of thepreceding body part, and the secondof which is part of the encapsulation boundary.
Html Mime Types Pokemon
The requirement that the encapsulationboundary begins with a CRLF implies that the body of a multipart entitymust itself begin with a CRLF beforethe first encapsulation line -- that is, if the 'preamble' areais not used, the entity headersmust be followed by TWO CRLFs. Thisis indeed how such entitiesshould be composed. A tolerant mailreading program, however, may interpreta body of type multipart that begins with an encapsulation lineNOT initiated by a CRLF as also being an encapsulation boundary, but a compliant mail sending program must not generate such entities.
Encapsulation boundaries must not appear within the encapsulations,and must be no longer than 70 characters, not counting the two leading hyphens.
The encapsulation boundary followingthe last body part is a distinguisheddelimiter that indicates that nofurther body parts will follow.Such a delimiter is identical to the previous delimiters, withthe addition of two more hyphens at the end of the line: There appears to be room for additionalinformation prior to the firstencapsulation boundary and followingthe final boundary. These areasshould generally be left blank,and implementations should ignoreanything that appears before thefirst boundary or after the lastone.
NOTE: These 'preamble' and 'epilogue'areas are not used because ofthe lack of proper typing of theseparts and the lack of clear semantics for handling these areas at gateways, particularly X.400 gateways.
NOTE: Because encapsulation boundariesmust not appear in the bodyparts being encapsulated, a user agent must exercise care to choosea unique boundary. The boundary in the example above could havebeen the result of an algorithm designed to produce boundaries witha very low probability of already existing in the data to be encapsulatedwithout having to prescan the data. Alternate algorithms might result in more 'readable' boundariesfor a recipient with an old useragent, but would require more attention to the possibility that the boundary might appear in the encapsulated part. The simplest boundary possible is somethinglike '---', with a closing boundaryof '-----'.
As a very simple example, the followingmultipart message has two parts,both of them plain text, oneof them explicitly typed and oneof them implicitly typed: The use of a Content-Type of multipartin a body part within another multipart entity is explicitly allowed. In such cases, for obvious reasons,care must be taken to ensure that each nested multipart entity must use a different boundarydelimiter. See Appendix C for anexample of nested multipart entities.
The use of the multipart Content-Typewith only a single body partmay be useful in certain contexts,and is explicitly permitted.
The only mandatory parameter forthe multipart Content-Type isthe boundary parameter, whichconsists of 1 to 70 charactersfrom a set of characters known tobe very robust through emailgateways, and NOT ending with whitespace. (If a boundary appears toend with white space, the white space must be presumed to havebeen added by a gateway, and shouldbe deleted.) It is formallyspecified by the following BNF: Overall, the body of a multipartentity may be specified as follows: NOTE: Conspicuously missing fromthe multipart type is a notionof structured, related body parts.In general, it seems prematureto try to standardize interpartstructure yet. It is recommendedthat those wishing to provide a more structured or integrated multipartmessaging facility should define a subtype of multipart thatis syntactically identical, butthat always expects the inclusionof a distinguished part that canbe used to specify the structure and integration of the other parts,probably referring to them by their Content-ID field. If thisapproach is used, other implementationswill not recognize the new subtype, but will treat it as the primarysubtype (multipart/mixed) and willthus be able to show the user theparts that are recognized.
7.2.2 The Multipart/mixed (primary)subtype
The primary subtype for multipart,'mixed', is intended for use when the body parts are independent andintended to be displayed serially. Any multipart subtypes that an implementation does not recognizeshould be treated as being of subtype'mixed'.Text Html Mime Type
7.2.3 The Multipart/alternativesubtype
The multipart/alternative type issyntactically identical to multipart/mixed, but the semantics are different. In particular, each of the partsis an 'alternative' version of the same information. User agentsshould recognize that the contentof the various parts are interchangeable.The user agent should eitherchoose the 'best' type based onthe user's environment and preferences,or offer the user the availablealternatives. In general, choosingthe best type means displayingonly the LAST part that can be displayed. This may be used, for example,to send mail in a fancy text formatin such a way that it can easily be displayed anywhere: In this example, users whose mailsystem understood the 'text/x-whatever'format would see only the fancyversion, while other users wouldsee only the richtext or plain text version, depending on the capabilitiesof their system.In general, user agents that composemultipart/alternative entitiesshould place the body parts in increasingorder of preference, that is, withthe preferred format last. For fancy text, the sending useragent should put the plainest formatfirst and the richest format last. Receiving user agents shouldpick and display the last formatthey are capable of displaying. In the case where one of the alternatives is itself of type 'multipart' and contains unrecognizedsub-parts, the user agent may chooseeither to show that alternative,an earlier alternative, or both.
NOTE: From an implementor's perspective,it might seem more sensible toreverse this ordering, and havethe plainest alternative last.However, placing the plainest alternative first is the friendliest possible option when mutlipart/alternativeentities are viewed using a non-MIME- compliant mail reader. While thisapproach does impose some burdenon compliant mail readers, interoperabilitywith older mail readers was deemedto be more important in this case.
It may be the case that some useragents, if they can recognizemore than one of the formats, willprefer to offer the user the choiceof which format to view. Thismakes sense, for example, if mailincludes both a nicely-formatted image version and an easily-editedtext version. What is mostcritical, however, is that the usernot automatically be shown multipleversions of the same data. Either the user should be shown thelast recognized version or should explicitly be given the choice.
7.2.4 The Multipart/digest subtype
This document defines a 'digest'subtype of the multipart Content-Type. This type is syntactically identical to multipart/mixed, but the semantics are different. In particular, in a digest, the defaultContent-Type value for a body part is changed from 'text/plain' to 'message/rfc822'. This is done to allow a more readable digest format that is largely compatible (except for the quotingconvention) with RFC 934.Html Mime Types
A digest in this format might, then,look something like this: