The MessageUID property returns an integer value which
specifies a unique identifier for this message. The actual value is
determined by the server and should be considered opaque. If the
client application stores the message UID on the local system, it
should also store the UID for the mailbox that contains the message.
If the mailbox UID changes, the message UID may no longer be
valid.
An application can use the MessageUID property value in
combination with the MailboxUID 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.