The mailMessage represents an internet mail message entity.Framework EDI (FREDI) recognizes an internet message as a document that follows the
standard described in RFC 822: Standard For the Format of ARPA Text Messages, which
basically describes a text message consisting of a header and a body.
This standard has been revised to RFC 2822: Internet Message Format
and extended into other RFCs (example MIME), but still the fundamental concept
of the header-body message continue to be maintained.
Header.The header section always appears before the body and consists of a list of fields.A
single field is made up of a field name and a field value separated by a colon.The field is terminated by a carriage-return line-feed pair (CRLF).
Body.The body is optional and contains the freeform data of the message.In a composite (or multipart) message, the body does not exist but is instead
replaced with multiple sub messages or body parts.
The header and body section must be separated by an empty line.
Message Header
The message header section consists of a list of fields.A header field consists of a field name and a field value separated by a colon. The
field is terminated by a carriage-return line-feed pair (CRLF).
<field name> <colon> <field value> <CRLF>
Example:
Subject: The quick brown fox
Where:
“Subject” is the field name. “The quick brown
fox” is the field value.
The header section of the message can contain a list of fields
that must follow each other in succession and not separated by any empty line. When the header gets too long, the
field value is terminated with a CRLF, and continues to the next line preceded
by a character space.
This is known as folding.
The following is an example of a header, called "Subject",
that is being folded:
Notice how the next line -- " lazy dog" -- is preceded by a
space. When this header is read, it will replace any
<CRLF><single space> sequence with a concatenate operation, such
that the resulting field value above will be stored as "The quick brown fox
jumps over the lazy dog."
Following the list of headers in the message is an empty line,
which indicates the end of the header section. There must NOT be an empty
line between the headers, otherwise the list of headers following the empty
line will be accepted as the body of the message.
The following is a sample of an internet message showing how
the header and body is separated by an empty line:
Message Body
The message body is freeform data.Any data can go here -- even binary data.In a composite message, the single body is replaced by multiple sub messages
separated by a boundary string.The
composite message must have the “Content/Type” header which specifies the type
of composite message -- “multipart” or “message” – and specifies the boundary
string in the “boundary” parameter.
Example of composite message:
When a composite message is read, the body parts are stored in
the mailMessages collection.