MIME Module

Properties   Methods   Events   Config Settings   Errors  

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

Syntax

IPWorks.MIME

Remarks

The class may be used for decoding or encoding of messages. Message holds the content of the encoded message or the filename that holds the encoded data. The decoded data are 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 class to start parsing the message: it will fill out the ContentType and ContentTypeAttr properties with message content-type information, and it will 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 does not 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 a part-decoded string or a 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 a 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 class 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 are decoded/encoded.

Property List


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

BoundaryThis property includes the boundary separating the MIME parts. It has a maximum length of 80 bytes.
ContentTypeThis property includes the value of the content-type header of the message that was encoded/decoded.
ContentTypeAttrThis property includes the attributes of the content-type header of the message that was encoded or decoded.
MessageThis property contains the encoded message text or a path to a file that contains the encoded message text.
MessageHeadersThis property includes the headers of the MIME message.
MessageHeadersStringThis property includes the string version of the MIME message headers.
PartsThis property contains information about all parts of a MIME message.

Method List


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

ConfigSets or retrieves a configuration setting.
DecodeFromFileThis method decodes from a file.
DecodeFromStringThis method decodes from a string.
DecodePartThis method decodes the specified part.
DecodePartToFileThis method decodes the specified part to a file on disk.
EncodeToFileThis method encodes to a file.
EncodeToStringThis method encodes to a string.
ResetThis method will reset the module.
ResetDataThis method resets the values of all headers and part properties.

Event List


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

ErrorFired when information is available about errors during data delivery.
HeaderThis event is fired every time a header is parsed.
ProgressThis event shows the progress of decoding or encoding the input data.

Config Settings


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

DecodeMessageHeadersInstructs the module to automatically decode message headers.
IncludeHeadersTells the module whether to include the headers when encoding the message.
RequireVersionHeaderSpecifies whether or not the module 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.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveDataWhether sensitive data is masked in log messages.
UseInternalSecurityAPIWhether or not to use the system security libraries or an internal implementation.

Boundary Property (MIME Module)

This property includes the boundary separating the MIME parts. It has a maximum length of 80 bytes.

Syntax

public var boundary: String {
  get {...}
  set {...}
}

@property (nonatomic,readwrite,assign,getter=boundary,setter=setBoundary:) NSString* boundary;

- (NSString*)boundary;
- (void)setBoundary :(NSString*)newBoundary;

Default Value

""

Remarks

This property contains the boundary separating the MIME parts and has a maximum length of 80 bytes. The class automatically generates a random boundary value during encoding, if no value is given. During decoding, this property is filled with the boundary from the actual MIME message.

The class will truncate any string longer than 80 bytes if assigned to Boundary.

ContentType Property (MIME Module)

This property includes the value of the content-type header of the message that was encoded/decoded.

Syntax

public var contentType: String {
  get {...}
  set {...}
}

@property (nonatomic,readwrite,assign,getter=contentType,setter=setContentType:) NSString* contentType;

- (NSString*)contentType;
- (void)setContentType :(NSString*)newContentType;

Default Value

""

Remarks

This property contains the value of the content-type header of the message that was encoded/decoded. The class filters it out from the MessageHeaders. It shows the user information about the type of the parts and their relation to each other.

The content-type attributes, such as filename, boundary, and charset, are held in this property.

ContentTypeAttr Property (MIME Module)

This property includes the attributes of the content-type header of the message that was encoded or decoded.

Syntax

public var contentTypeAttr: String {
  get {...}
  set {...}
}

@property (nonatomic,readwrite,assign,getter=contentTypeAttr,setter=setContentTypeAttr:) NSString* contentTypeAttr;

- (NSString*)contentTypeAttr;
- (void)setContentTypeAttr :(NSString*)newContentTypeAttr;

Default Value

""

Remarks

This property contains content-type attributes such as "filename", "boundary", and "charset".

Message Property (MIME Module)

This property contains the encoded message text or a path to a file that contains the encoded message text.

Syntax

public var message: String {
  get {...}
  set {...}
}

public var messageB: Data { get {...} set {...} }

@property (nonatomic,readwrite,assign,getter=message,setter=setMessage:) NSString* message;

- (NSString*)message;
- (void)setMessage :(NSString*)newMessage;

@property (nonatomic,readwrite,assign,getter=messageB,setter=setMessageB:) NSData* messageB;

- (NSData*)messageB;
- (void)setMessageB :(NSData*)newMessage;

Default Value

""

Remarks

This property contains the encoded message text or a path to a file that contains the encoded message text. The class fills out this property with the message body and MessageHeaders during encoding. The user may assign both the headers and the body to this property and leave MessageHeaders empty before decoding.

MessageHeaders Property (MIME Module)

This property includes the headers of the MIME message.

Syntax

public var messageHeaders: Array<Header> {
  get {...}
}

@property (nonatomic,readwrite,assign,getter=messageHeaderCount,setter=setMessageHeaderCount:) int messageHeaderCount;

- (int)messageHeaderCount;
- (void)setMessageHeaderCount :(int)newMessageHeaderCount;

- (NSString*)messageHeaderField:(int)messageHeaderIndex;
- (void)setMessageHeaderField:(int)messageHeaderIndex :(NSString*)newMessageHeaderField;

- (NSString*)messageHeaderValue:(int)messageHeaderIndex;
- (void)setMessageHeaderValue:(int)messageHeaderIndex :(NSString*)newMessageHeaderValue;

Default Value

0

Remarks

This property contains the headers of the MIME message. The class fills out this property upon encoding. The user should use them as additional headers when emailing the Message.

During decoding, if this property is empty, the class will try to find the headers in the beginning of the Message and then will fill out this property accordingly.

This property is read-only.

MessageHeadersString Property (MIME Module)

This property includes the string version of the MIME message headers.

Syntax

public var messageHeadersString: String {
  get {...}
  set {...}
}

@property (nonatomic,readwrite,assign,getter=messageHeadersString,setter=setMessageHeadersString:) NSString* messageHeadersString;

- (NSString*)messageHeadersString;
- (void)setMessageHeadersString :(NSString*)newMessageHeadersString;

Default Value

""

Remarks

The component fills out MessageHeadersString upon encoding. The user should use these strings as additional headers when emailing the Message.

This property contains a string version of the MIME message headers. During decoding, if this property is empty, the class will try to find the headers in the beginning of the Message and will fill out this property accordingly.

Parts Property (MIME Module)

This property contains information about all parts of a MIME message.

Syntax

public var parts: Array<MIMEPart> {
  get {...}
}

@property (nonatomic,readwrite,assign,getter=partCount,setter=setPartCount:) int partCount;

- (int)partCount;
- (void)setPartCount :(int)newPartCount;

- (NSString*)partContentDisposition:(int)partIdx;
- (void)setPartContentDisposition:(int)partIdx :(NSString*)newPartContentDisposition;

- (NSString*)partContentDispositionAttr:(int)partIdx;
- (void)setPartContentDispositionAttr:(int)partIdx :(NSString*)newPartContentDispositionAttr;

- (NSString*)partContentId:(int)partIdx;
- (void)setPartContentId:(int)partIdx :(NSString*)newPartContentId;

- (NSString*)partContentType:(int)partIdx;
- (void)setPartContentType:(int)partIdx :(NSString*)newPartContentType;

- (NSString*)partContentTypeAttr:(int)partIdx;
- (void)setPartContentTypeAttr:(int)partIdx :(NSString*)newPartContentTypeAttr;

- (NSString*)partDecodedFile:(int)partIdx;
- (void)setPartDecodedFile:(int)partIdx :(NSString*)newPartDecodedFile;

- (NSString*)partDecodedString:(int)partIdx;
- (void)setPartDecodedString:(int)partIdx :(NSString*)newPartDecodedString;

- (NSData*)partDecodedStringB:(int)partIdx;
- (void)setPartDecodedStringB:(int)partIdx :(NSData*)newPartDecodedString;
- (int)partEncoding:(int)partIdx;
- (void)setPartEncoding:(int)partIdx :(int)newPartEncoding;

- (NSString*)partFileName:(int)partIdx;
- (void)setPartFileName:(int)partIdx :(NSString*)newPartFileName;

- (NSString*)partHeaders:(int)partIdx;
- (void)setPartHeaders:(int)partIdx :(NSString*)newPartHeaders;

- (NSString*)partName:(int)partIdx;
- (void)setPartName:(int)partIdx :(NSString*)newPartName;

- (int)partSize:(int)partIdx;

Default Value

0

Remarks

This property contains information about all parts of a MIME message. A MIME message consists of different parts, separated by either a user-specified or an auto-generated boundary. Each part has its own set of headers that are contained in the field.

The MIMEPARTS collection is filled out by the class when a call to either DecodeFromFile or DecodeFromString is made. However, when the EncodeToFile or EncodeToString methods are called, the class encodes the data given in either or into a MIME message.

This property is read-only.

Config Method (MIME Module)

Sets or retrieves a configuration setting.

Syntax

public func config(configurationString: String) throws -> String
- (NSString*)config:(NSString*)configurationString;

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

DecodeFromFile Method (MIME Module)

This method decodes from a file.

Syntax

public func decodeFromFile() throws -> Void
- (void)decodeFromFile;

Remarks

This method decodes the data file given in Message and optionally MessageHeaders and fills out the Parts properties for each decoded part.

Example. Decoding from a File:

MIMEControl.Message = "C:\filename.txt" MIMEControl.DecodeFromFile

In this example, C:\filename.txt must contain the MIME headers and body. If not, the MessageHeaders property must be set to the appropriate MIME headers.

DecodeFromString Method (MIME Module)

This method decodes from a string.

Syntax

public func decodeFromString() throws -> Void
- (void)decodeFromString;

Remarks

This method decodes from a string. It is the same as DecodeFromFile, but now the Message denotes the real encoded message rather than a filename.

This method decodes the data given in Message and optionally MessageHeaders and fills out the Parts properties.

Example. Decoding a Mail Message:

MIMEControl.MessageHeadersString = MailControl.MessageHeaders MIMEControl.Message = MailControl.MessageText MIMEControl.DecodeFromString

DecodePart Method (MIME Module)

This method decodes the specified part.

Syntax

public func decodePart(index: Int32) throws -> Data
- (NSData*)decodePart:(int)index;

Remarks

This method decodes the part specified by Index and returns the decoded part data.

DecodeFromString or DecodeFromFile must be called before calling this method. Calling this method will return the decoded bytes, and in addition, the PartsDecodedString property will be populated with the string representation of the decoded data.

Example. Decoding a Specified Part: mime.MessageHeadersString = myMessageHeaders; mime.Message = myMessageBody; mime.DecodeFromString(); byte[] myPartContent = await mime.DecodePart(0);

DecodePartToFile Method (MIME Module)

This method decodes the specified part to a file on disk.

Syntax

public func decodePartToFile(index: Int32) throws -> String
- (NSString*)decodePartToFile:(int)index;

Remarks

This method decodes the part specified by Index to a temporary file. The full path to the temporary file is returned by this method. The user is responsible for deleting the temporary file.

DecodeFromString or DecodeFromFile must be called before calling this method.

EncodeToFile Method (MIME Module)

This method encodes to a file.

Syntax

public func encodeToFile() throws -> Void
- (void)encodeToFile;

Remarks

This method encodes the data given in Parts properties (either a decoded file or a decoded string) into a MIME message at Message and MessageHeaders using the values optionally given in Parts properties. To encode several objects into a MIME envelope, the user should first clear any old values left in the Parts properties.

The class will check for each item in Parts properties (first the decoded file and then the decoded string) for the data to encode.

The encoded message will be saved in the file pointed to by Message; the message headers will be held by MessageHeaders.

Example. Encoding Data:

MIMEControl.ResetData() MIMEControl.PartCount = 2 MIMEControl.PartDecodedString(0) = "This is plain text data" MIMEControl.PartEncoding(0) = peQuotedPrintable MIMEControl.PartContentType(0) = "text/plain" MIMEControl.PartDecodedFile(1) = "C:\filename.txt" MIMEControl.Message = "temp.tmp" MIMEControl.EncodeToFile()

EncodeToString Method (MIME Module)

This method encodes to a string.

Syntax

public func encodeToString() throws -> Void
- (void)encodeToString;

Remarks

This method encodes to a string. It is the same as EncodeToFile but the encoded data are held in the Message property rather than saved to a file.

This method encodes the data given in the Parts properties into a MIME message. The message gets stored in Message and MessageHeaders using the values optionally given in Parts properties. To encode several objects into a MIME envelope, the user should first clear any old values left in the Parts properties by calling ResetData.

The class will check each item in the Parts properties (first the decoded file and then the decoded string) for the data to encode.

The encoded message will be stored in the Message property; the message headers will be held by MessageHeaders.

Example. Encoding Data:

MIMEControl.ResetData() MIMEControl.PartCount = 2 MIMEControl.PartDecodedString(0) = "This is plain text data" MIMEControl.PartEncoding(0) = peQuotedPrintable MIMEControl.PartContentType(0) = "text/plain" MIMEControl.PartDecodedFile(1) = "C:\filename.txt" MIMEControl.EncodeToString()

Reset Method (MIME Module)

This method will reset the component.

Syntax

public func reset() throws -> Void
- (void)reset;

Remarks

This method will reset the class's properties to their default values.

ResetData Method (MIME Module)

This method resets the values of all headers and part properties.

Syntax

public func resetData() throws -> Void
- (void)resetData;

Remarks

This method resets the values of all headers and part properties. It is an easy way to reset the class's properties before starting to populate the part properties with new values.

Error Event (MIME Module)

Fired when information is available about errors during data delivery.

Syntax

func onError(errorCode: Int32, description: String)
- (void)onError:(int)errorCode :(NSString*)description;

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the class .

The ErrorCode parameter contains an error code, and the Description parameter contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

Header Event (MIME Module)

This event is fired every time a header is parsed.

Syntax

func onHeader(partIndex: Int32, field: String, value: Data)
- (void)onHeader:(int)partIndex :(NSString*)field :(NSData*)value;

Remarks

The PartIndex parameter contains the index of the part containing the current header. If the header is from the MIME body, this value will be -1. The Field parameter contains the name of the MIME header. The Value parameter contains the header contents. The Header event is fired when a header is parsed, which occurs for each header of the message when DecodeFromFile, DecodeFromString, or DecodeFromStream is called.

Progress Event (MIME Module)

This event shows the progress of decoding or encoding the input data.

Syntax

func onProgress(percentDone: Int32)
- (void)onProgress:(int)percentDone;

Remarks

The Progress allows the user to visualize the progress of processing the input data.

The PercentDone parameter shows what percentage of the input has been read.

Header Type

This is an HTTP header as it is received from the server.

Remarks

When a header is received through a Header event, it is parsed into a Header type. This type contains a , and its corresponding .

The following fields are available:

Fields

field
String

Default Value: ""

This property contains the name of the HTTP Header (this is the same case as it is delivered).

value
String

Default Value: ""

This property contains the Header contents.

Constructors

public init()
public init(field: , value: )

MIMEPart Type

This is a part of the MIME message.

Remarks

Each MIME message is split into parts. A message must have at least one part to be a valid MIME message. The message itself is split into the MessageHeaders and the Message body. The body is then split into MIME parts by a specified or generated Boundary. Each part of a MIME message has its own as well. These headers describe the MIMEPart and its contents.

The decoded data will be held in or otherwise will be saved in a temporary file given by when the user asks for the value of the respective field.

If the encoded data are file data, the decoded file(s) will be given in the field. Otherwise, the decoded data will be in the field.

When the EncodeToString method is called, the class will check for each item in the Parts properties (first the and then the ) for the data to encode.

The following fields are available:

Fields

contentDisposition
String

Default Value: ""

This property contains content disposition for each part.

The value in this property is used in the Content-Disposition header. Typical values include "form-data" and "attachment". The class fills it out each time the is changed. Changing the recalculates the as well.

contentDispositionAttr
String

Default Value: ""

This property contains the content disposition's attribute (if any) for each part.

Typical values for this property are the names of the form-variables used while creating an HTTP post or the values for filenames.

Setting this property recalculates the .

contentId
String

Default Value: ""

This property contains the content identifier for each part. The value of this property is used in the Content-Id header. The class fills it out each time the is changed. Changing this property recalculates the as well.

contentType
String

Default Value: ""

This property contains the content type for each part. The value of this property is used in the Content-Type header. Typical values include "image/gif" and "text/plain". The class fills it out each time the is changed. Changing this property recalculates the as well.

contentTypeAttr
String

Default Value: ""

This property contains the content-type attribute, if any, for each part. Setting this recalculates the as well.

decodedFile
String

Default Value: ""

This property may be set to a file on disk before calling EncodeToString, EncodeToFile or EncodeToStream. When encoding, data for the part will be read from the specified file.

When decoding, call DecodePartToFile to decode a specific part to a file on disk.

decodedStringB
Data

Default Value: ""

This property holds the actual content of each part. The class decodes the actual part of Message to when 's value is first queried.

Setting a value to fills out the corresponding with the string size if the corresponding is empty.

The class checks during encoding first : if it is empty, then the class uses the value of .

Note: It is recommended to use the DecodePart method instead of querying this property.

decodedString
String

Default Value: ""

This property holds the actual content of each part. The class decodes the actual part of Message to when 's value is first queried.

Setting a value to fills out the corresponding with the string size if the corresponding is empty.

The class checks during encoding first : if it is empty, then the class uses the value of .

Note: It is recommended to use the DecodePart method instead of querying this property.

encoding
MIMEPartEncodings

Default Value: 0

This property contains the actual content encoding type for each part. This property determines how to encode the data or how they actually were encoded in the Message, as specified in the Content-Transfer-Encoding header.

Possible values for the this property are as follows:

pe7bit (0)7 Bit data, no encoding.
peQuotedPrintable (1)Quoted-Printable encoding of (typically) text.
peBase64 (2)Base64 encoding of binary data.
pe8Bit (3)No encoding, 8-bit characters may be contained as well.
peBinary (4)Binary data without any encoding. Similar to 3 (8-bit encoding).
peUUEncode (5)Uuencoding of binary data.

fileName
String

Default Value: ""

This property contains the filename attribute specified in the headers of the part. Changing the value of the corresponding automatically sets the and consequently the .

headers
String

Default Value: ""

This property contains the headers for each MIME part. The class fills out this property each time any of the other corresponding part properties are changed. If additional headers are needed, they should be appended after all of the other corresponding part properties are set.

name
String

Default Value: ""

This property contains the name given to a part, such as the filename. Changing the value of automatically sets the corresponding and consequently the .

size
Int32 (read-only)

Default Value: 0

This property contains the size of the or . If a non-empty value is assigned to , then class fills out the corresponding with the file size; if the file does not exist, an error occurs.

If the is empty and a value is assigned to , then the corresponding will be equal to the string's size.

During decoding, this property is filled with the size of that part.

Constructors

public init()
public init(decodedFile: )
public init(decodedString: )
public init(partInputStream: )

Config Settings (MIME Module)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

MIME Config Settings

DecodeMessageHeaders:   Instructs the component to automatically decode message headers.

Message headers that have been Quoted-Printable or Base64 encoded are automatically decoded when this configuration setting is True. The default value of this setting is False.

IncludeHeaders:   Tells the class whether to include the headers when encoding the message.

If True, the class will include the headers when EncodeToFile or EncodeToString are called. If False, only the message will be encoded.

The default value for IncludeHeaders is False.

RequireVersionHeader:   Specifies whether or not the class should require the version header.

If True, the class will require that the "MIME-Version" header be included in the MessageHeaders. If the header is not present during decoding, the component . This configuration setting is False by default.

SanitizeFileName:   Whether invalid characters are replaced in MIME part filenames.

If True, the class will replace invalid characters with an underscore when decoding the MIME message. This applies to the filename held in the PartsFileName property. When True, the following characters are considered invalid:

  • \
  • /
  • "
  • :
  • ?
  • *
  • <
  • >
  • |
Any characters with ASCII values between 0 and 31 are also considered invalid. The default value is False.
TempFilePath:   If set, the temporary files created during MIME decoding and encoding will be put in the path specified.

The TempFilePath property sets the path at which the temporary files will be created.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

CodePage:   The system code page used for Unicode to Multibyte translations.

The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8
The following is a list of valid code page identifiers for Mac OS only:
IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitiveData:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to to mask sensitive data. The default is .

This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

UseInternalSecurityAPI:   Whether or not to use the system security libraries or an internal implementation.

When set to , the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to tells the class to use the internal implementation instead of using the system security libraries.

This setting is set to by default on all platforms.

Trappable Errors (MIME Module)

MIME Errors

3   Can't create the file for write (illegal name or disk is write-protected).
4   Can't open the file for read (doesn't exist?).
5   Can't read from file.
6   Can't write to file (disk full?).
280   Invalid Part Index.
281   Unknown MIME type.
282   No MIME-boundary found.
283   No file given.
284   The class is busy.
285   Can't create a temporary file to decode the data.
286   Can't read Message file.
287   No header separator found.
289   No separator found.
290   Input stream must have seeking enabled.