Retrieves status information (list of messages with message numbers as well as size for each message)

Namespace: S22.Pop3
Assembly: S22.Pop3 (in S22.Pop3.dll) Version: 1.1.4653.26443 (1.1.0.0)

Syntax

C#
public MessageInfo[] GetStatus()

Return Value

An array of MessageInfo objects containing status information for the mailbox.

Examples

CopyC#
Pop3Client Client = new Pop3Client("pop.gmail.com", 995, "My_UsernamMe",
    "My_Password", true, AuthMethod.Login);

MessageInfo[] info = Client.GetStatus();

foreach(MessageInfo i in info)
{
    Console.WriteLine("New message in inbox with messageNumber = " + i.Number +
        ", size in bytes = " + i.Size);
}

Client.Dispose();

Exceptions

ExceptionCondition
S22.Pop3..::..NotAuthenticatedExceptionThrown if the method was called in a non-authenticated state, i.e. before logging into the server with valid credentials.
S22.Pop3..::..BadServerResponseExceptionThrown if the operation could not be completed. The message property of the exception contains the error message returned by the server.

See Also