I’m trying to get a list of mailboxes using AE.Net.Mail and I cannot find any documentation. The ListMailboxes method takes in a reference string and a pattern string. I’m not sure what either parameter should be.
using (var imap = new AE.Net.Mail.ImapClient(host, username, password, AE.Net.Mail.ImapClient.AuthMethods.Login, port, isSSL))
{
List<Mailbox> boxes = imap.ListMailboxes("", ""); // string reference, string parameter
}
The
ImapClient.ListMailboxesmethod from AE.Net.Mail is a pretty thin wrapper for the IMAPLISTcommand.Section 6.3.8 of the IMAP RFC contains some examples of how these parameters are generally interpreted by the IMAP server ("Mailbox Name" is the
patternparameter):Though it also says the following regarding the
Referenceparameter:So the examples may or may not work depending on your server implementation.