Indy 9
TIdMessagePart
Hierarchy, Properties, Methods, Events, See Also, Unit: IdMessage
Implements the base class for MIME message parts.
TIdMessagePart = class(TCollectionItem)
Unit
IdMessage
Description
TIdMessagePart is a TCollectionItem descendant that encapsulates a MIME message part. TIdMessagePart is the ancestor class for common MIME message parts like TIdText and TIdAttachment. TIdMessagePart is also the collection item added to the TIdMessageParts collection.

TIdMessagePart provides methods and properties common to all MIME message parts, including properties that represent values from Internet Message headers.


TIdMessagePart.Boundary
TIdMessagePart
Character sequence that delimits the message part.
property Boundary: String;
Description
Boundary is a String property that contains the character sequence that delimits the message part in an Internet Message. Boundary applies to message parts where the ContentType is "multipart".

Boundary marks the beginning of each message part in the file, and also follows the final message part in the message. Boundary contains the character sequence that follows the mandatory boundary marker prefix "--".


TIdMessagePart.BoundaryBegin
TIdMessagePart
Indicates that a boundary marker appears at the beginning of the message part.
property BoundaryBegin: Boolean;
Description
BoundaryBegin is a Boolean property that indicates that a boundary marker appears at the beginning of the message part. BoundaryBegin is used and updated when the message part is received by a message client.

TIdMessagePart.BoundaryEnd
TIdMessagePart
Indicates that a boundary marker appears at the end of the message part.
property BoundaryEnd: Boolean;
Description
BoundaryEnd is a Boolean property that indicates that a boundary marker appears at the end of the message part. BoundaryEnd is used and updated when the message part is received by a message client.

TIdMessagePart.ContentTransfer
TIdMessagePart
Identifies the encoding scheme for the message part.
property ContentTransfer: string;
Description
ContentTransfer is a String property that identifies the encoding scheme for the message part. ContentTransfer contains the value from the Internet Message header "Content-Transfer-Encoding:".

ContentTransfer contains a token that identifies the encoding transformations performed for the message part or the domain for the result. ContentTransfer normally contains one of the following values:

  • "7bit"

  • "8bit"

  • "binary"

  • "quoted-printable"

  • "base64"

The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all indicate that NO encoding transformation has been performed. The quoted-printable and base64 encodings transform their input into values using "7bit" representation.

Note: The five values defined for the ContentTransfer imply nothing about the ContentType other than the algorithm by which it was encoded or the transport system requirements when UU-encoded.

Note: ContentTransfer is not case sensitive -- "Base64", "BASE64" and "bAsE64" are all equivalent.


TIdMessagePart.ContentType
TIdMessagePart, See Also
Identifies the MIME media type for the message.
property ContentType: string;
Description
ContentType is a String property that specifies the MIME media type for the message. Use ContentTransfer to identify the encoding scheme for the message.

TIdMessagePart.ExtraHeaders
TIdMessagePart, See Also
Represents message header without property storage.
property ExtraHeaders: TIdHeaderList;
Description
ExtraHeaders is a TIdHeaderList property that represents headers from the Internet Message that do not have corresponding properties to represent their values in the object instance.

TIdMessagePart.Headers
TIdMessagePart, See Also
Represents message headers in native form.
property Headers: TIdHeaderList;
Description
Headers is a read-only TIdHeaderList property used to represent the headers for the Internet Message in NAME=VALUE form.

TIdMessagePart.IsEncoded
TIdMessagePart, See Also
Indicates that the body for the message part is MIME-encoded.
property IsEncoded: Boolean;
Description
IsEncoded is a read-only Boolean property that indicates the body of the message part is stored in MIME-encoded form. IsEncoded normally reflects that the body contains a graphic image, or BASE64- or QUOTED-PRINTABLE-encoded value.

TIdMessagePart.StoredPathName
TIdMessagePart
Identifies the temporary storage file for the message part.
property StoredPathName: TFileName;
Description
StoredPathName is a TFilename property that represents the file used to store the message part. StoredPathName can contain a temporary path and file name if the message part represents an attachment without a ContentDisposition header specifying a suggested file name.

TIdMessagePart.Assign
TIdMessagePart
Copy the property values from another object.
procedure Assign(Source: TPersistent); override;
Parameters
Source: TPersistent
Object instance containing values to be copied.
Description
Assign is a procedure used to copy the property values from the object specified in Source to the current collection item instance. When the ClassType for Source is the same as the current object, Assign will copy the following property values:

When the ClassType for Source is not the same as the current object, Assign calls the inherited Assign method.


TIdMessagePart.Create
TIdMessagePart
Constructor for the collection item.
constructor Create(Collection: TCollection); override;
Parameters
Collection: TCollection
Owner of the collection item.
Description
Create is the constructor for the collection item, and simply raises an exception saying that a TIdMessagePart instance cannot be created and added to the collection. Use a TIdMessagePart descendant to override this constructor with parameters to add items to a TIdMessageParts collection.

TIdMessagePart.Destroy
TIdMessagePart, See Also
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing and releasing resources allocated to the Headers and ExtraHeaders properties. Destroy calls the inherited destructor prior to exiting from the method.

TIdMessagePart.OnGetMessagePartStream
TIdMessagePart
Event handler for retrieving a message part from a stream.
property OnGetMessagePartStream: TOnGetMessagePartStream;
Parameters
AStream
Stream containing the content for the message part.
Description
OnGetMessagePartStream is a TOnGetMessagePartStream event handler used to respond to the notification that a message part is available to be read from AStream.

An application must assign a procedure to OnGetMessagePartStream to allow a response to the event notification.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.