C#
C#
Transition from Imap.ListMailboxes to Imap.MbxList
Provides instructions for replacing deprecated ListMailboxes method calls with MbxList.Chilkat C# Downloads
bool success = false;
Chilkat.Imap imap = new Chilkat.Imap();
// ...
// ...
string reference = "";
string mbxPattern = "*";
// ------------------------------------------------------------------------
// The ListMailboxes method is deprecated:
// Lists all mailboxes, including unsubscribed.
Chilkat.Mailboxes mboxesObj = imap.ListMailboxes(reference,mbxPattern);
if (imap.LastMethodSuccess == false) {
Debug.WriteLine(imap.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using MbxList.
// Your application creates a new, empty Mailboxes object which is passed
// in the last argument and filled upon success.
// Lists all mailboxes, including unsubscribed.
bool subscribed = false;
Chilkat.Mailboxes mboxes = new Chilkat.Mailboxes();
success = imap.MbxList(subscribed,reference,mbxPattern,mboxes);
if (success == false) {
Debug.WriteLine(imap.LastErrorText);
return;
}