IP*Works! OpenPGP V9 - Online Help
IP*Works! OpenPGP V9
Questions / Feedback?

MIME Bean

Properties   Methods   Events   Configuration Settings   Errors  

The MIME component allows for the simple encoding and decoding of MIME structures such as message attachments, file uploads, etc.

Syntax

IPWorksOpenPGP.Mime

Remarks

The bean 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 collection .

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 bean 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 collection , 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 collection 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 collection property, and optionally assign values to the other part attributes in the Parts collection . Assigning a value to the part decoded string or part decoded file through the Parts collection , fills out automatically the part headers into the Parts collection for the respective part. Calling EncodeToFile or EncodeToString directs the bean 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 bean with short descriptions. Click on the links for further details.

BoundaryThe boundary separating the MIME parts. Maximum length of 80 bytes.
ContentTypeThe value of the content-type header of the message which was encoded/decoded.
ContentTypeAttrThe attributes for content-type header of the message which was encoded/decoded.
MessageContains the encoded message text or a path to a file which contains the encoded message text.
MessageHeadersThe headers of the MIME message.
MessageHeadersStringString version of the MIME message headers.
PartsContains information about all parts of a MIME message.

Method List


The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting .
decodeFromFileDecodes from file.
decodeFromStreamDecodes from stream.
decodeFromStringDecodes from string.
encodeToFileEncodes to file.
encodeToStreamEncodes to stream.
encodeToStringEncodes to string.
resetDataResets the values of all headers and Part- properties.

Event List


The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.
HeaderFired every time a header is parsed.
ProgressShows the progress of decoding/encoding the input data.

Configuration Settings


The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.

IncludeHeadersTells the component whether to include the headers when encoding the message.
RequireVersionHeaderSpecifies whether or not the component should require the version header.
SanitizeFilenameWhether invalid characters are replaced in MIME part filenames.
TempFilePathIf set, the temporary files created during MIME decoding and encoding will be put in the path specified.
DecodeMessageHeadersInstructs the component to automatically decode message headers.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0