Pop3GetMessageUids Method |
Gets the array of Unique-ID's of all messages in the inbox. The array is zero-based.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string[] GetMessageUids()
Public Function GetMessageUids As String()
Return Value
Type:
StringA zero-based array of Unique-ID strings of all messages in the inbox
or a null reference (
Nothing in Visual Basic) in case of an error.
Exceptions Remarks Since the lower index in a .NET array is 0 while the lower message number in the inbox is 1,
indices in the Unique-ID's array are -1 to the message numbers.
Examples This sample displays Unique-ID values of the first and the last message in the inbox.
using MailBee;
using MailBee.Pop3Mail;
Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
pop.Login("jdoe", "secret");
string[] uids = pop.GetMessageUids();
Console.WriteLine("Unique-ID of message #1 is " + uids[0]);
Console.WriteLine("Unique-ID of message #" + pop.InboxMessageCount +
" is " + uids[pop.InboxMessageCount - 1]);
pop.Disconnect();
Imports MailBee
Imports MailBee.Pop3Mail
Dim pop As New Pop3
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret")
Dim uids As String() = pop.GetMessageUids()
Console.WriteLine("Unique-ID of message #1 is " & uids(0))
Console.WriteLine("Unique-ID of message #" & pop.InboxMessageCount & _
" is " & uids(pop.InboxMessageCount - 1))
pop.Disconnect()
See Also