Returns the name or parameters of the specified POP3 capability.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string GetExtension(
string name
)
Public Function GetExtension (
name As String
) As String
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:
StringIf 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 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 |
---|
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.
using MailBee;
using MailBee.Pop3Mail;
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();
Imports MailBee
Imports MailBee.Pop3Mail
Dim pop As New Pop3
pop.Connect("mail.domain.com")
Dim ext As String
ext = pop.GetExtension("pipelining")
If ext Is Nothing Then
Console.WriteLine("The given POP3 server does not support pipelining")
Else
Console.WriteLine("Pipelining is supported")
End If
pop.Disconnect()
See Also