This component is part of the IP Works Enterprise ASP.NET Component Library.
The MIME component allows for easy implementation of the Multipurpose Internet Mail Extensions or MIME as defined in RFC 1521 and updated in RFCs 2045-2049. Those standards provide for formatting of messages containing non-text, multipart or non 'US' formatted text.
NOTE: What follows is a very short description of the component interfaces. For more information, please consult the help files that come with the respective package.
Remarks
The component may be used for decoding or encoding of messages. Message holds the content of the encoded message or the filename which holds the encoded data. The decoded data is put in PartDecodedString and/or PartDecodedFile depending on the user's query.
To decode a MIME message you should first assign either the whole message (headers and body) to Message or put the message headers into the MessageHeaders property and the message body or the filename holding it into the Message property. Calling DecodeFromFile or DecodeFromString directs the component to start parsing the message: it will fill out the ContentType, ContentTypeAttr and PartCount properties as well as the array properties PartSize, PartContentType, PartContentTypeAttr, PartContentDisposition, PartContentDispositionAttr, PartEncoding, PartName, PartFilename, PartHeaders, for each decoded part from 0 to PartCount-1.
For each part you may then get the content out of PartDecodedString or PartDecodedFile properties. Calling the DecodeFromString or DecodeFromFile to decode doesn't actually decode the message but only parses it. The real decoding is done when the respective array property PartDecodedFile or PartDecodedString is first accessed for any particular index.
To encode data into a MIME message you should first assign values for each part to either PartDecodedString or PartDecodedFile, optionally assign values to the other Part- properties. Assigning a value to the PartDecodedString or PartDecodedFile properties fills out automatically the PartHeaders property for the respective part. Calling EncodeToFile or EncodeToString directs the component to fill out the Message with the message body and the MessageHeaders with the headers.
The Progress event is fired as the message is parsed and the data is decoded/encoded.
More Information: http://www.nsoftware.com/products/component/mime.aspx |