Lianja
Lianja
Transition from Imap.FetchHeaders to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchHeaders method calls with FetchMsgSet.Chilkat Lianja Downloads
llSuccess = .F.
loImap = createobject("CkImap")
// ...
// ...
loMset = createobject("CkMessageSet")
llSuccess = loImap.QueryMbx("FROM joe@example.com",.T.,loMset)
// ...
// ...
// ------------------------------------------------------------------------
// The FetchHeaders method is deprecated:
loBundleObj = loImap.FetchHeaders(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 = .T.
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