mailMessage

The mailMessage allows processing of an internet mail message.  Framework EDI (FREDI) recognizes an internet mail 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.

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

Example of header being folded:

The first empty line encountered indicates the end of the header section and any data following thereafter begins the body section. 

Example:

Message Body

The message body is the 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:

 

 

Methods

Properties