Sample code for 30+ languages & platforms
Xbase++ Requires Chilkat v11.0.0+

Transition from Imap.ListMailboxes to Imap.MbxList

Provides instructions for replacing deprecated ListMailboxes method calls with MbxList.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oImap
LOCAL cReference
LOCAL cMbxPattern
LOCAL oMboxesObj
LOCAL nSubscribed
LOCAL oMboxes

nSuccess := 0

oImap := CreateObject("Chilkat.Imap")

//  ...
//  ...

cReference := ""
cMbxPattern := "*"

//  ------------------------------------------------------------------------
//  The ListMailboxes method is deprecated:

//  Lists all mailboxes, including unsubscribed.
oMboxesObj := oImap:ListMailboxes(cReference, cMbxPattern)
IF (oImap:LastMethodSuccess == 0)
    ? oImap:LastErrorText
    oImap:destroy()
    RETURN
ENDIF

//  ...
//  ...

oMboxesObj:destroy()

//  ------------------------------------------------------------------------
//  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.
nSubscribed := 0

oMboxes := CreateObject("Chilkat.Mailboxes")
nSuccess := oImap:MbxList(nSubscribed, cReference, cMbxPattern, oMboxes)
IF (nSuccess == 0)
    ? oImap:LastErrorText
    oImap:destroy()
    oMboxes:destroy()
    RETURN
ENDIF

oImap:destroy()
oMboxes:destroy()