Internet Direct (Indy) Version 9.0.2 Beta
TIdMailBox.UIDNext
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.