Sample code for 30+ languages & platforms
Lianja Requires Chilkat v11.0.0+

Transition from Imap.FetchBundle to Imap.FetchMsgSet

Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loImap = createobject("CkImap")

//  ...
//  ...

loMset = createobject("CkMessageSet")
llSuccess = loImap.QueryMbx("FROM joe@example.com",.T.,loMset)
//  ...
//  ...

//  ------------------------------------------------------------------------
//  The FetchBundle method is deprecated:

loBundleObj = loImap.FetchBundle(loMset)
if (loImap.LastMethodSuccess = .F.) then
    ? loImap.LastErrorText
    release loImap
    release loMset
    return
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.

llHeadersOnly = .F.

loBundleOut = createobject("CkEmailBundle")
llSuccess = loImap.FetchMsgSet(llHeadersOnly,loMset,loBundleOut)
if (llSuccess = .F.) then
    ? loImap.LastErrorText
    release loImap
    release loMset
    release loBundleOut
    return
endif



release loImap
release loMset
release loBundleOut