Go
Go
Transition from Imap.ListSubscribed to Imap.MbxList
Provides instructions for replacing deprecated ListSubscribed method calls with MbxList.Chilkat Go Downloads
success := false
imap := chilkat.NewImap()
// ...
// ...
reference := ""
mbxPattern := "*"
// ------------------------------------------------------------------------
// The ListSubscribed method is deprecated:
// Lists only subscribed mailboxes.
mboxesObj := imap.ListSubscribed(reference,mbxPattern)
if imap.LastMethodSuccess() == false {
fmt.Println(imap.LastErrorText())
imap.DisposeImap()
return
}
// ...
// ...
mboxesObj.DisposeMailboxes()
// ------------------------------------------------------------------------
// 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.
subscribed := true
mboxes := chilkat.NewMailboxes()
success = imap.MbxList(subscribed,reference,mbxPattern,mboxes)
if success == false {
fmt.Println(imap.LastErrorText())
imap.DisposeImap()
mboxes.DisposeMailboxes()
return
}
imap.DisposeImap()
mboxes.DisposeMailboxes()