Indy 9 | Content | Index | Reference

TIdMailBox
Hierarchy, Properties, Methods, See Also, Unit: IdMailBox
Represents information about an IMAP4 mailbox.

    TIdMailBox = class(TIdBaseComponent)

Unit
IdMailBox
Description
TIdMailBox is a TIdBaseComponent descendant that represents information about a mailbox selected using the IMAP4 protocol. TIdMailBox identifies the Attributes of the mailbox, updateable flags, state information, and the list of messages in the currently seleted mailbox.

TIdMailBox can also indicate dynamic information, such as message numbers found that meet some search criteria, or a list messages that have been marked for deletion in the mailbox.

TIdMailBox is the type used to represent the TIdIMAP4.MailBox property, and is updated when the IMAP4 client performs a Select, Examine, or Status operation using the IMAP4 protocol.

TIdMailBox.Attributes
TIdMailBox, See Also
Indicates mailbox attributes for the currently selected mailbox.

    property Attributes: TIdMailBoxAttributes;

Description
Attributes is a TIdMailBoxAttributes property that indicates the mailbox attributes associated with the currently selected mailbox. Attributes can contain values defined in TIdMailBoxAttributes. Attributes is updated when the resulting values from TIdIMAP4.ListMailBoxes are parsed.

TIdMailBox.ChangeableFlags
TIdMailBox, See Also
Represents the permanent flags for am IMAP4 mailbox.

    property ChangeableFlags: TIdMessageFlagsSet;

Description
ChangeableFlags is a TIdMessageFlagsSet property that represents the permanent flags indicated when a mailbox is selected using TIdIMAP4.SelectMailBox.

TIdMailBox.FirstUnseenMsg
TIdMailBox, See Also
Initial message number containing an "Unseen" flag.

    property FirstUnseenMsg: LongInt;

Description
FirstUnseenMsg is a LongInt property that indicates the initial message in MessageList that contains the IMAP4 UNSEEN message flag in the Flags property. FirstUnseenMsg is determined when the results from TIdIMAP4.SelectMailBox are parsed, and can be used by the IMAP4 client to determine which message should be active when the mailbox is loaded.

TIdMailBox.Flags
TIdMailBox, See Also
Indicates IMAP4 flags set for the current message.

    property Flags: TIdMessageFlagsSet;

Description
Flags is a TIdMessageFlagsSet property that contains values that indicates the flags set for the current message. Flags is updated when TIdIMAP4.Retrieve is used to fetch a message from the IMAP4 server. Flags is used when the message is added or updated on the IMAP4 server.

TIdMailBox.MessageList
TIdMailBox, See Also
Represents messsages and headers retrieved from the current mailbox.

    property MessageList: TIdMessageCollection;

Description
MessageList is a TIdMessageCollection property that contains TIdMessageItem object instances. MessageList represents the messages and/or headers retrieved from the IMAP4 server in TIdIMAP4.SelectMailBox.

TIdMailBox.Name
TIdMailBox, See Also
Identifies the mailbox in the IMAP4 mailbox hierarchy.

    property Name: String;

Description
Name is a String property that identifies the mailbox in the IMAP4 mailbox hierarchy. Name is updated when TIdIMAP4.SelectMailBox is used to access a mailbox on the IMAP4 server. Name is also provided as an argument to the TIdIMAP4 methods CreateMailBox, DeleteMailBox, ExamineMailBox, and StatusMailBox.

TIdMailBox.RecentMsgs
TIdMailBox
Indicates the number of messages added since the last mailbox access.

    property RecentMsgs: LongInt;

Description
RecentMsgs is a LongInt property that indicates the number of messages in MessageList that contain the "Recent" message flag. RecentMsgs are those that have been added to the mailbox since the last time the mailbox was selected.

TIdMailBox.State
TIdMailBox, See Also
Indicates if the mailbox allows read and write access.

    property State: TIdMailBoxState;

Description
State is a TIdMailBoxState property that indicates the mailbox state detected in the results for TIdIMAP4.SelectMailBox.

msReadWrite indicates that the currently selected mailbox allows creating new messages, updating message flags and attributes, and deletion of messasges.

msReadOnly indicates that the currently select mailbox will nbot allow updates to the IMAP mailbox.

TIdMailBox.TotalMsgs
TIdMailBox, See Also
Indicates the number of messages in the currently selected mailbox.

    property TotalMsgs: LongInt;

Description
TotalMsgs is a LongInt property that indicates the number of messages in MessageList for the currently selected mailbox. TotalMsgs is updated when the IMAP client performs a call to either the SelectMailBox, ExamineMailBox, or StatusMailBox methods.

TIdMailBox.UIDNext
TIdMailBox, See Also
Indicates the next UID value for a messaged added to the mailbox.

    property UIDNext: String;

Description
UIDNext is a String property that indicates the next Unique Identifier value (UID) that will be assigned to a new message added to the currently selected mailbox. UIDNext is used with UIDValidity to determine the permanent Uniqueness identifier for a message in the currently selected mailbox.

UIDNext is updatd when the IMAP4 client executes the TIdIMAP4.StatusMailBox method.

TIdMailBox.UIDValidity
TIdMailBox, See Also
Indicates the mailbox UID value for a messaged added to the mailbox.

    property UIDValidity: String;

Description
UIDValidity is a String property that indicates the Unique Identifier Validity value for the currently selected mailbox. UIDValidity is used with UIDNext to determine the permanent Uniqueness identifier for a message in the currently selected mailbox.

UIDValidity is updatd when the IMAP4 client executes the TIdIMAP4.StatusMailBox method, or when a new mailbox is selected using TIdIMAP4.SelectMailBox.

TIdMailBox.UnseenMsgs
TIdMailBox, See Also
Indicates the number of unread messages in the current mailbox.

    property UnseenMsgs: LongInt;

Description
UnseenMsgs is a LongInt property that indicates the number of messages in the currently selected mailbox that have not been read by the IMAP4 client. UnseenMsgs is updated when the resuilts from the TIdIMAP4.StatusMailBox method are parsed.

TIdMailBox.Clear
TIdMailBox, See Also
Reset properties of the mailbox to their default values.

    procedure Clear; virtual;

Description
Clear is a procedure used to reset properties of the mailbox to their default values. Clear returns the mailbox to the state that exists prior to selection of the current mailbox using an IMAP4 client. Clear resets the following properties to the indicated values:

- TotalMsgs - 0

- RecentMsgs - 0

- UnseenMsgs - 0

- FirstUnseenMsg - 0

- UIDValidity - ''

- UIDNext - ''

- Name - ''

- State - msReadOnly

- Attributes - maNoselect

- Flags - [] (empty set)

- ChangeableFlags - [] (empty set)

Clear also removes the contents of the DeleteMsgs, SearchResult, and MessageList container properties.

TIdMailBox.Create
TIdMailBox, See Also
Constructor for the object instance.

    constructor Create(AOwner: TComponent); override;

Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the Constructor for the object instance, and relies on the inherited Create method to initialize properties. Create also initializes the TIdMessageCollection instance used in the MessageList propertie, using TIdMessageItem as the collection item class. Create calls Clear to insure that other properties in the instance are reset to their default values.

TIdMailBox.Destroy
TIdMailBox, See Also
Frees the object instance.

    destructor Destroy; override;

Description
Destroy is the destructor for the object instance, and frees resources allocated in the object instance like MessageList. Destroy calls the inherited Destroy method prior to exiting the method.

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