Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from MailMan.GetAllHeaders to MailMan.FetchAll
Provides instructions for replacing deprecated GetAllHeaders method calls with FetchAll.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oMailman
LOCAL nNumBodyLines
LOCAL oBundleObj
LOCAL nKeepOnServer
LOCAL nHeadersOnly
LOCAL oBundleOut
nSuccess := 0
oMailman := CreateObject("Chilkat.MailMan")
// ...
// ...
nNumBodyLines := 5
// ------------------------------------------------------------------------
// The GetAllHeaders method is deprecated:
oBundleObj := oMailman:GetAllHeaders(nNumBodyLines)
IF (oMailman:LastMethodSuccess == 0)
? oMailman:LastErrorText
oMailman:destroy()
RETURN
ENDIF
// ...
// ...
oBundleObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using FetchAll.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
nKeepOnServer := 1
nHeadersOnly := 1
oBundleOut := CreateObject("Chilkat.EmailBundle")
nSuccess := oMailman:FetchAll(nKeepOnServer, nHeadersOnly, nNumBodyLines, oBundleOut)
IF (nSuccess == 0)
? oMailman:LastErrorText
oMailman:destroy()
oBundleOut:destroy()
RETURN
ENDIF
oMailman:destroy()
oBundleOut:destroy()