When writing a message, the
MIME parser creates a message bit stream using the logical message tree. The
MIME domain does not enforce all of the constraints that the MIME specification
requires, therefore it might generate MIME messages that do not conform to
the MIME specification. The constraints that the MIME parser imposes are:
- The tree must have a root called MIME, and constituent Parts, Part, and
Data elements, as described in Logical tree elements.
- Exactly one Content-Type header must be present at the top level of the
tree, or be available via the ContentType property. Media subtypes are not
validated.
- If the media type is multipart then there must also
be a valid boundary parameter.
- Any constituent MIME parts may have exactly one Content-Type header. If
the value of this header starts with multipart then it
must also include a valid boundary parameter. The value of this boundary parameter
must not be the same as other boundary parameter values in the definition.
- The MIME Content-Type value "message" is not supported and results
in an error at run time.
- All name-value elements in the tree are written as name: value followed
by the ASCII sequence <CR><LF>.
If you have other elements in the tree, the parser behaves in
the same way as the HTTP header parser:
- A name-only element or a NameValue element with a NULL value results in Name:
NULL .
- Any children of a name-value element are ignored.
The message flow must serialize subtrees if they exist. This can be
done using the ESQL command
ASBITSTREAM.