Visual FoxPro
Visual FoxPro
Transition from Imap.FetchBundle to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loImap
LOCAL loMset
LOCAL loBundleObj
LOCAL lnHeadersOnly
LOCAL loBundleOut
lnSuccess = 0
loImap = CreateObject('Chilkat.Imap')
* ...
* ...
loMset = CreateObject('Chilkat.MessageSet')
lnSuccess = loImap.QueryMbx("FROM joe@example.com",1,loMset)
* ...
* ...
* ------------------------------------------------------------------------
* The FetchBundle method is deprecated:
loBundleObj = loImap.FetchBundle(loMset)
IF (loImap.LastMethodSuccess = 0) THEN
? loImap.LastErrorText
RELEASE loImap
RELEASE loMset
CANCEL
ENDIF
* ...
* ...
RELEASE loBundleObj
* ------------------------------------------------------------------------
* Do the equivalent using FetchMsgSet.
* Your application creates a new, empty EmailBundle object which is passed
* in the last argument and filled upon success.
lnHeadersOnly = 0
loBundleOut = CreateObject('Chilkat.EmailBundle')
lnSuccess = loImap.FetchMsgSet(lnHeadersOnly,loMset,loBundleOut)
IF (lnSuccess = 0) THEN
? loImap.LastErrorText
RELEASE loImap
RELEASE loMset
RELEASE loBundleOut
CANCEL
ENDIF
RELEASE loImap
RELEASE loMset
RELEASE loBundleOut