MIME Component |
The MIME control 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 formating of messages containing non-text, multipart or non 'US' formated text. (NOTE: The following is a very short description. For more information, please consult the help files that come with the respective package.) |
To decode a MIME message you should first assign either the whole message (headers and body) to Message or put the message headers to MessageHeaders and the message body or the filename holding it to Message. Setting Action property to decode directs the control 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. Setting Action 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. Assiging a value to the PartDecodedString or PartDecodedFile properties fills out automatically the PartHeaders property for the respective part. Set Action property to encode directs the control 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.
PROPERTIES |
EVENTS |