Sample code for 30+ languages & platforms
Lianja

Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loImap = createobject("CkImap")

// ...
// ...

lnStartSeqNum = 1
lnCount = 5

// ------------------------------------------------------------------------
// The FetchSequenceAsMime method is deprecated:

loSa = loImap.FetchSequenceAsMime(lnStartSeqNum,lnCount)
if (loImap.LastMethodSuccess = .F.) then
    ? loImap.LastErrorText
    release loImap
    return
endif

// ...
// ...

release loSa

// ------------------------------------------------------------------------
// Do the equivalent using FetchSingleBd.

loImap.AutoDownloadAttachments = .T.

llSuccess = .F.
loBdMime = createobject("CkBinData")
llBUid = .F.
i = 0
do while i < lnCount
    llSuccess = loImap.FetchSingleBd(lnStartSeqNum + i,llBUid,loBdMime)
    // ...
    // ...

    i = i + 1
enddo


release loImap
release loBdMime