Pop3GetExtension Method
Returns the name or parameters of the specified POP3 capability.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public string GetExtension(
	string name
)

Parameters

name
Type: SystemString
The name of the capability. This name is case-insensitive, e.g. pipelining and PIPELINING mean the same.

Return Value

Type: String
If the specified capability is parameterless, the return value is the name of the capability itself. If the capability has parameters, the return value is a string which contains the parameters list as returned by the server. If the server does not support CAPA command (see GetExtensions for more information) or the given capability is not supported, the return value is a null reference (Nothing in Visual Basic).
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks
The POP3 server (if supports CAPA command) always returns the list of all capabilities at once. Thus, all subsequent calls to GetExtension(String), GetExtensions, or GetExtensionValue(String) methods will use the cached version of the capability data, and no round-trips to the server will be made.
Note Note
This method may issue a network operation if the list of supported extensions has not yet been downloaded from the POP3 server. To make sure you have the local copy of the list, call GetExtensions first (or its async version).
Examples
This sample displays whether the server supports POP3 pipelining.
// 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");
string ext = pop.GetExtension("pipelining");
if (ext == null)
{
    Console.WriteLine("The given POP3 server does not support pipelining");
}
else
{
    Console.WriteLine("Pipelining is supported");
}
pop.Disconnect();
See Also