| DWORD GetMessageUID( |
| |
UINT nMessageId |
|
| ); |
The GetMessageUID method returns the unique identifier
(UID) for the specified message in the current mailbox.
Parameters
- nMessageId
- Number of message to obtain the unique identifier for. This
value must be greater than zero. The first message in the mailbox
is message number one.
Return Value
If the method succeeds, it returns a non-zero value. If no unique
identifier is assigned to the message, the method will return zero.
If an error occurs, the method returns IMAP_ERROR. To get extended
error information, call GetLastError.
Remarks
The GetMessageUID method returns an unsigned integer value
which specifies a unique identifier for this message. The actual
value is determined by the server and should be considered
opaque.
An application can use the message UID value in combination with
the mailbox UID 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.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csmapv12.lib
See Also
|