列出 IMAP 服务器扩展

Contents
[ ]

Aspose.Email ImapClient 让您检索服务器支持的扩展,例如 IDLE、UNSELECT、QUOTA 等。这有助于在使用客户端的特定功能之前识别扩展的可用性。该 getCapabilities() 方法以字符串数组的形式返回支持的扩展类型。以下代码片段展示了如何检索扩展。

// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-Java
// Connect and log in to IMAP
ImapClient client = new ImapClient("imap.gmail.com", "username", "password");
String[] getCapabilities = client.getCapabilities();
for (String getCap : getCapabilities) {
    System.out.println(getCap);
}