IPWorks S/MIME 2020 Delphi Edition

Questions / Feedback?

MIMEPart Type

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 Headers as well. These headers describe the MIMEPart and its contents.

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

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

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

Fields

ContentDisposition
String

Content disposition for each part.

The value in this property is used in the Content-Disposition header. Typical values include "form-data", "attachment" etc. The component fills it out each time the DecodedFile is changed. Changing the ContentDisposition recalculates the Headers as well.

ContentDispositionAttr
String

The content disposition's attribute (if any) for each part.

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

Setting this property recalculates the Headers.

ContentId
String

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

ContentType
String

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

ContentTypeAttr
String

The content type attribute, if any, for each part. Setting this recalculates the Headers as well.

DecodedFile
String

The filename with the decoded data. Accessing this property for the first time after calling the DecodeFromString or DecodeFromFile method, directs the component to actually decode the part and save the data in a temporary file. The user is responsible for deleting the temporary file.

Setting a value to DecodedFile directs the component to calculate the file size and fill out the respective Size.

DecodedString
String

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

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

The component checks during encoding first DecodedFile: if it is empty then the component uses the value of DecodedString.

DecodedStringB
TBytes

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

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

The component checks during encoding first DecodedFile: if it is empty then the component uses the value of DecodedString.

Encoding
TipmMIMEPartEncodings

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

Possible values for the this property are:

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

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

Headers
String

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

Name
String

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

PartInputStream
TStream

This property contains a stream which contains the actual content of each part before the message is encoded.

Size
Integer

This property contains the size of the DecodedFile or DecodedString. If a non empty value is assigned to DecodedFile, then component fills out the corresponding Size with the file size or an error occurs if the file doesn't exist.

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

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

Constructors

constructor Create();
constructor Create(valDecodedFile: String);
constructor Create(valDecodedString: TBytes);

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks S/MIME 2020 Delphi Edition - Version 20.0 [Build 8154]