Returns a reference to the key-value list of the server capabilities.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public StringDictionary GetExtensions()
Public Function GetExtensions As StringDictionary
Return Value
Type:
StringDictionaryThe key-value list of the server capabilities, or a null reference
(
Nothing in Visual Basic) if the capabilities list is not available.
Exceptions 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 |
---|
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.
using MailBee;
using MailBee.Pop3Mail;
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)
{
Console.WriteLine(cap + " " + val);
}
else
{
Console.WriteLine(cap);
}
}
}
pop.Disconnect();
user
top
stls
last
sasl LOGIN PLAIN CRAM-MD5 DIGEST-MD5 MSN NTLM
uidl
pipelining
In the output above, only "sasl" capability has parameters.
Imports MailBee
Imports MailBee.Pop3Mail
Dim pop As New Pop3
pop.Connect("mail.domain.com")
Dim caps As System.Collections.Specialized.StringDictionary = pop.GetExtensions()
If caps Is Nothing Then
Console.WriteLine("The given POP3 server does not support CAPA command")
Else
Dim cap As String
Dim val As String
For Each cap In caps.Keys
val = caps(cap)
If val <> String.Empty Then
Console.WriteLine(cap & " " & val)
Else
Console.WriteLine(cap)
End If
Next
End If
pop.Disconnect()
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