Returns a reference to the key-value list of the mail server capabilities.
The key-value list of the mail server capabilities, or a null reference (Nothing in Visual Basic) if the capabilities list is not available.
You should already be connected to the IMAP4 server in order to use this method.
In the returned StringDictionary, each key is a capability name (always lowercase) and its value is an empty string (because IMAP4's capabilities have no parameters).
| Exception Type | Condition |
|---|---|
| MailBeeException | An error occurred and ThrowExceptions is true. |
This sample displays the list of all capabilities supported by the mail server.
[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"); System.Collections.Specialized.StringDictionary caps = imp.GetExtensions(); if (caps == null) { Console.WriteLine("The given server does not support any IMAP4 extensions"); } else { foreach (string cap in caps.Keys) { Console.WriteLine(cap); } } imp.Disconnect(); // The output (the actual content will be different for a particular mail server). auth=plain multiappend imap4 auth=login literal+ auth=digest-md5 imap4rev1 auth=ntlm quota uidplus starttls auth=cram-md5
[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 caps As System.Collections.Specialized.StringDictionary = imp.GetExtensions() If caps Is Nothing Then Console.WriteLine("The given server does not support any IMAP4 extensions") Else For Each cap As String In caps.Keys Console.WriteLine(cap) Next End If imp.Disconnect() ' The output (the actual content will be different for a particular mail server). auth=plain multiappend imap4 auth=login literal+ auth=digest-md5 imap4rev1 auth=ntlm quota uidplus starttls auth=cram-md5
Imap Class | MailBee.ImapMail Namespace