MailboxUID Property  
 

Returns the unique identifier for the current mailbox.

Syntax

object.MailboxUID

Remarks

The MailboxUID property returns an integer value which uniquely identifies the mailbox and corresponds to the UIDVALIDITY value returned by the IMAP server. The actual value is determined by the server and should be considered opaque. The protocol specification requires that a mailbox's UID must not change unless the mailbox contents are modified or existing messages in the mailbox have been assigned new UIDs.

An application can use the MailboxUID property value in combination with the MessageUID property in order to uniquely identify a message on the server. However, the application must take into consideration that the IMAP server can reassign new message UIDs when the mailbox is modified. If the mailbox and message UIDs are being stored on the local system to track what messages have been retrieved from the server, the application must check the UID of the mailbox whenever it is selected. If the mailbox UID has changed, this means that the UIDs for the messages in that mailbox may have changed. The client should resynchronize with the server, and update it's local copy of that mailbox.

Data Type

Integer (Int32)

See Also

Mailbox Property, Mailboxes Property, MailboxFlags Property, MailboxName Property