Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Imap.FetchSequence to Imap.FetchRange
Provides instructions for replacing deprecated FetchSequence method calls with FetchRange.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oImap
LOCAL nStartSeqNum
LOCAL nCount
LOCAL oBundleObj
LOCAL nHeadersOnly
LOCAL oBundleOut
nSuccess := 0
oImap := CreateObject("Chilkat.Imap")
// ...
// ...
nStartSeqNum := 1
nCount := 5
// ------------------------------------------------------------------------
// The FetchSequence method is deprecated:
oBundleObj := oImap:FetchSequence(nStartSeqNum, nCount)
IF (oImap:LastMethodSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
RETURN
ENDIF
// ...
// ...
oBundleObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using FetchRange.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
nHeadersOnly := 0
oBundleOut := CreateObject("Chilkat.EmailBundle")
nSuccess := oImap:FetchRange(nHeadersOnly, nStartSeqNum, nCount, oBundleOut)
IF (nSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
oBundleOut:destroy()
RETURN
ENDIF
oImap:destroy()
oBundleOut:destroy()