MessageUID Property  
 

Return the unique ID for the current message on the mail server.

Syntax

object.MessageUID

Remarks

The MessageID property returns a string which uniquely identifies the message on the server. The identifier is assigned by the mail server, and retains the same value across multiple client sessions. This value is typically used when the client wants to leave a message on the mail server, but does not wish to retrieve the message contents multiple times. For example, the client can store the unique ID for each message that it retrieves, but does not delete from the server. The next time that it connects to the mail server, it compares the unique ID of a message against the stored values. If there is a match, the client knows that the message has already been retrieved, and does not need to do so again.

This property requires that the server support the optional UIDL command. If the command is not supported, this property will always return an empty string. Note that the unique ID for the message is not the same as the Message-ID header field in the message itself.

Data Type

String

See Also

Message Property, MessageCount Property, MessageSize Property