MailBee.NET Objects 7.1

Pop3.GetMessageUidFromIndex Method 

Gets the Unique-ID string assigned to the specified message in the inbox on the server.

public string GetMessageUidFromIndex(
   int index
);

Parameters

index
The message number (in the range from 1 to InboxMessageCount) of the message. Can be negative in the range from -1 to -InboxMessageCount, i.e. -1 denotes the last e-mail in the inbox.

Return Value

The Unique-ID string assigned to the specified message in the inbox on the server.

Remarks

Unique-ID is not the same value as MessageID. Unique-ID is assigned to each message in the inbox by the POP3 server, while MessageID value is assigned to the message by the mail composing program. For instance, if the same message was placed into the inbox twice, both copies will have the same MessageID value, but Unique-ID values will be different.

Unique-ID's is the preferred way of implementation of downloading new mails mechanism.

CAUTION   Some old POP3 servers have no support for Unique-ID's and thus do not implement the POP3 protocol's UIDL command.

Exceptions

Exception TypeCondition
MailBeeInvalidArgumentExceptionThe message index is not in the range from 1 to InboxMessageCount (by absolute value).
MailBeeExceptionAn error occurred and ThrowExceptions is true.

See Also

Pop3 Class | MailBee.Pop3Mail Namespace | GetMessageIndexFromUid | InboxPreloadOptions