Returns the name of the specified IMAP4 capability if it's supported by the mail server.
If 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).
You should already be connected to the IMAP4 server in order to use this method.
| Exception Type | Condition |
|---|---|
| MailBeeException | An error occurred and ThrowExceptions is true. |
This sample displays whether the server supports UIDPLUS capability.
[C#] // To use the code below, import MailBee namespaces at the top of your code. using MailBee; using MailBee.ImapMail; // The actual code (put it into a method of your class). 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();
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.ImapMail ' The actual code (put it into a method of your class). 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()
Imap Class | MailBee.ImapMail Namespace