The mailBody represents the body of an internet message.A
message mainly consists of a list of headers and a body, separated by a NULL
line.The headers section always precedes the body as defined by the syntax form:
Message = <Headers> <NULL> <Body>
Below is a sample of an internet message that shows the
header and body section.
The body holds the following properties:
Data in the body is treated as binary.
There is no limitation to the size of the data in the body barring limitations
imposed by disk space.
There is no limitation to the number of characters allowed in a single line.To format the body to a specific number of characters per line, the WrapText
method can be used to insert carriage-return line-feed pair (CRLF) into
the text.
The body in a body part (sub message) of a composite message does not include
the CRLF that starts the boundary delimiter that terminates the body
part. For example, consider the following internet message. It is a
composite message with only one body part, and the boundary string is
"boundary.string" as specified by the Content-Type header boundary
parameter. The closing boundary "--boundary.string--" terminates the body
part.
The diagram below shows how the body is extracted apart from the closing
boundary delimiter. The left side of the diagram displays the byte
representation of the message. On the right side is the text
representation of the message. The CRLF is represented by the bytes 0D 0A
sequence, and is part of the closing boundary that is highlighted in
blue. The gray highlight is the body that is extracted from the body
part, which does not include the trailing CRLF.
Export
- Exports the content of the body to an external file.
GenerateDigest
- Generates the digest or hash on the content of the body.
GetCmsEnvelopedData
- If the content of the body is recognzed as a Cryptographic Message Syntax
(CMS) EnvelopedData format, then an object representing this format is
returned.
GetCmsSignedData
- If the content of the body is recognzed as a Cryptographic Message Syntax
(CMS) SignedData format, then an object representing this format is
returned.
Import
- Imports the content of an external file into the body overwriting the
existing content.
ReplaceCharNotInStr
- Replace a character in the content of the body with a string.