Pop3GetExtensions Method
Returns a reference to the key-value list of the server capabilities.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public StringDictionary GetExtensions()

Return Value

Type: StringDictionary
The key-value list of the server capabilities, or a null reference (Nothing in Visual Basic) if the capabilities list is not available.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks
You should already be connected to the POP3 server in order to use this method. If the server does not support CAPA command, the capabilities list will not be available. In this case, you can still try to call GetSupportedAuthMethods to get at least the list of supported authentication methods (AUTH command responsible for this is more widely supported than CAPA).
Note Note
If CAPA command has already been issued (for instance, this method has already been called or MailBee downloaded this list for its own purpose (such as to determine whether pipelining is supported by the server), this method will immediately return the cached results.

In the returned StringDictionary, each key is a capability name (always lowercase). Its value is either empty string (if the capability has no parameters) or space-delimited list of the parameters.

Examples
This sample displays the list of all capabilities supported by the server.
// To use the code below, import MailBee namespaces at the top of your code
using MailBee;
using MailBee.Pop3Mail;

// The actual code (put it into a method of your class)
Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
System.Collections.Specialized.StringDictionary caps = pop.GetExtensions();
if (caps == null)
{
    Console.WriteLine("The given POP3 server does not support CAPA command");
}
else
{
    foreach (string cap in caps.Keys)
    {
        string val = caps[cap];
        if (val != string.Empty)
        {
            // Print capability name and parameters
            Console.WriteLine(cap + " " + val);
        }
        else
        {
            // For parameterless capabilities, print capability name only
            Console.WriteLine(cap);
        }
    }
}
pop.Disconnect();

// The output (the actual content will be different for a particular mail server).
user
top
stls
last
sasl LOGIN PLAIN CRAM-MD5 DIGEST-MD5 MSN NTLM
uidl
pipelining

In the output above, only "sasl" capability has parameters.
See Also