(C#) Transition from Imap.ListSubscribed to Imap.MbxList
Provides instructions for replacing deprecated ListSubscribed method calls with MbxList. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.Imap imap = new Chilkat.Imap();
// ...
// ...
string reference = "";
string mbxPattern = "*";
// ------------------------------------------------------------------------
// The ListSubscribed method is deprecated:
// Lists only subscribed mailboxes.
Chilkat.Mailboxes mboxesObj = imap.ListSubscribed(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 only subscribed mailboxes.
bool subscribed = true;
Chilkat.Mailboxes mboxes = new Chilkat.Mailboxes();
bool success = imap.MbxList(subscribed,reference,mbxPattern,mboxes);
if (success == false) {
Debug.WriteLine(imap.LastErrorText);
return;
}
|