Search: 
Available in: IP*WORKS!
Mime Class
MIME Component [IP*Works! V8]

Properties   Methods   Events   Configuration Settings  

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 formating of messages containing non-text, multipart or non 'US' formated 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 provided in Parts properties .

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 properties with message content type information, and enter information about message parts into the Parts properties , which includes: part sizes, part content types, part content type attributes, part content disposition, part content disposition attributes, part encoding, part name, part filename, part headers, or part content (part decoded string or part decoded file) for each decoded part.

Calling the DecodeFromString or DecodeFromFile to decode doesn't actually decode the message but only parses it. The real decoding is done when the part content in the Parts properties is first accessed.

To encode data into a MIME message you should first assign values for each part to either part decoded string or part decoded file in the Parts properties property, and optionally assign values to the other part attributes in the Parts properties . Assigning a value to the part decoded string or part decoded file through the Parts properties , fills out automatically the part headers into the Parts properties 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.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for complete descriptions.

Boundary The boundary separating the MIME parts. Maximum length of 80 bytes.
ContentType The value of the content-type header of the message which was encoded/decoded.
ContentTypeAttr The attributes for content-type header of the message which was encoded/decoded.
Message Contains the encoded message text or a path to a file which contains the encoded message text.
MessageHeaders The headers of the MIME message.
MessageHeadersString String version of the MIME message headers.
Parts Contains information about all parts of a MIME message.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for complete descriptions.

Config Sets or retrieves a component configuration setting.
DecodeFromFile Decode From File.
DecodeFromStream Decode From Stream.
DecodeFromString Decode From String.
EncodeToFile Encode To File.
EncodeToStream Encode To Stream.
EncodeToString Encode To String.
ResetData Resets the values of all headers and Part- properties.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for complete descriptions.

Error Information about errors during data delivery.
Header Fired every time a header is parsed.
Progress Shows the progress of decoding/encoding the input data.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for complete descriptions.

CodePage The system code page used for Unicode to Multibyte translations (Windows/COM only).
IncludeHeaders Tells the component whether to include the headers when encoding the message.
MaxParts The maximum number of parts to be parsed from a mime message.
RequireVersionHeader Specifies whether or not the component should require the version header.
TempFilePath If set, the temporary files created during MIME decoding and encoding will be put in the path specified

| About | Privacy Policy | Terms of Use |
© Copyright 2008 /n software inc.