简体   繁体   中英

how to get mailbox quota statistics using MailKit?

I'm using Mailkit IMAP client to connect to mail server but I receive errors when trying to get mailbox quota, can anyone help?

            var root = client.GetFolder(client.PersonalNamespaces[0]);
            root.Open(MailKit.FolderAccess.ReadOnly);
            return root.GetQuota();

the error message is

The IMAP server replied to the 'EXAMINE' command with a 'BAD' response

the mail server I use is kolab mail server.

What I want to do is to find out the mailbox storage usage of each user.

Any hekp highly appreciated! thanks.

You do not need to open the root folder to get the quota.

Most IMAP servers have a folder root that is not an actual folder and thus you will not be able to open it (just like in your case).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM