Returns the name of the specified IMAP4 capability if it's supported by the mail server.
Namespace: MailBee.ImapMailAssembly: 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. uidplus and UIDPLUS mean the same.
Return Value
Type:
StringIf the specified capability is supported, the return value is the lowercased name
of the capability. If the given capability is not supported, the return value is a
null reference (
Nothing in Visual Basic).
Exceptions Remarks You should already be connected to the IMAP4 server in order to use this method.
Examples This sample displays whether the server supports UIDPLUS capability.
using MailBee;
using MailBee.ImapMail;
Imap imp = new Imap();
imp.Connect("mail.domain.com");
string ext = imp.GetExtension("UIDPLUS");
if (ext == null)
{
Console.WriteLine("The given IMAP4 server does not support UIDPLUS");
}
else
{
Console.WriteLine("UIDPLUS is supported");
}
imp.Disconnect();
Imports MailBee
Imports MailBee.ImapMail
Dim imp As New Imap
imp.Connect("mail.domain.com")
Dim ext As String = imp.GetExtension("UIDPLUS")
If ext Is Nothing Then
Console.WriteLine("The given IMAP4 server does not support UIDPLUS")
Else
Console.WriteLine("UIDPLUS is supported")
End If
imp.Disconnect()
See Also