Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd
Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oImap
LOCAL nStartSeqNum
LOCAL nCount
LOCAL oSa
LOCAL oBdMime
LOCAL nBUid
LOCAL i
nSuccess := 0
oImap := CreateObject("Chilkat.Imap")
// ...
// ...
nStartSeqNum := 1
nCount := 5
// ------------------------------------------------------------------------
// The FetchSequenceAsMime method is deprecated:
oSa := oImap:FetchSequenceAsMime(nStartSeqNum, nCount)
IF (oImap:LastMethodSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
RETURN
ENDIF
// ...
// ...
oSa:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using FetchSingleBd.
oImap:AutoDownloadAttachments := 1
nSuccess := 0
oBdMime := CreateObject("Chilkat.BinData")
nBUid := 0
i := 0
DO WHILE i < nCount
nSuccess := oImap:FetchSingleBd(nStartSeqNum + i, nBUid, oBdMime)
// ...
// ...
i := i + 1
ENDDO
oImap:destroy()
oBdMime:destroy()