Lianja
Lianja
Transition from Imap.FetchSequence to Imap.FetchRange
Provides instructions for replacing deprecated FetchSequence method calls with FetchRange.Chilkat Lianja Downloads
llSuccess = .F.
loImap = createobject("CkImap")
// ...
// ...
lnStartSeqNum = 1
lnCount = 5
// ------------------------------------------------------------------------
// The FetchSequence method is deprecated:
loBundleObj = loImap.FetchSequence(lnStartSeqNum,lnCount)
if (loImap.LastMethodSuccess = .F.) then
? loImap.LastErrorText
release loImap
return
endif
// ...
// ...
release loBundleObj
// ------------------------------------------------------------------------
// Do the equivalent using FetchRange.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
llHeadersOnly = .F.
loBundleOut = createobject("CkEmailBundle")
llSuccess = loImap.FetchRange(llHeadersOnly,lnStartSeqNum,lnCount,loBundleOut)
if (llSuccess = .F.) then
? loImap.LastErrorText
release loImap
release loBundleOut
return
endif
release loImap
release loBundleOut