CImapClient::GetCapability Method  
 
INT GetCapability(
  LPTSTR lpszCapability,  
  INT nMaxLength  
);
INT GetCapability(
  CString& strCapability  
);

The GetCapability method returns a string which identifies the capabilities of the IMAP server.

Parameters

lpszCapability
A null-terminated string buffer that will contain one or more tokens separated by spaces which identify the capabilities of the IMAP server.
nMaxLength
The maximum length of the capability string, including the terminating null character.

Return Value

If the function succeeds, it returns the length of the capability string, not including the terminating null character. If an error occurs, the function returns IMAP_ERROR. To get extended error information, call GetLastError.

Remarks

This method returns a string that contains one or more tokens separated by whitespace. Each token identifies a capability of the server. The following table lists some of the common capabilities:

Capability Description
ACL The RFC 2086 ACL extension
BINARY The RFC 3516 binary content extension
CHILDREN The RFC 3348 child mailbox extension
ID The RFC 2971 ID extension
IDLE The RFC 2177 IDLE extension
LOGINDISABLED The RFC 2595 TLS/SSL extension
LOGINREFERRALS The RFC 2221 login referrals extension
MAILBOXREFERRALS The RFC 2193 mailbox referrals extension
MULTIAPPEND The RFC 3501 MULTIAPPEND extension
NAMESPACE The RFC 2342 namespace Extension
QUOTA The RFC 2087 QUOTA extension
STARTTLS The RFC 2595 TLS/SSL extension
UNSELECT The RFC 3691 UNSELECT extension

Additional capabilities may be supported by your server. Note that experimental or custom capabilities are always prefixed with the letter X. A list of standard IMAP capabilities is maintained by the Internet Assigned Numbers Authority (IANA) at www.iana.org.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csmapv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also