Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from MailMan.GetHeaders to MailMan.FetchRange
Provides instructions for replacing deprecated GetHeaders method calls with FetchRange.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oMailman
LOCAL nNumBodyLines
LOCAL nFromIndex
LOCAL nToIndex
LOCAL oBundleObj
LOCAL nKeepOnServer
LOCAL nHeadersOnly
LOCAL oBundleOut
nSuccess := 0
oMailman := CreateObject("Chilkat.MailMan")
// ...
// ...
nNumBodyLines := 3
nFromIndex := 0
nToIndex := 9
// ------------------------------------------------------------------------
// The GetHeaders method is deprecated:
oBundleObj := oMailman:GetHeaders(nNumBodyLines, nFromIndex, nToIndex)
IF (oMailman:LastMethodSuccess == 0)
? oMailman:LastErrorText
oMailman:destroy()
RETURN
ENDIF
// ...
// ...
oBundleObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using FetchRange.
// 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:FetchRange(nKeepOnServer, nHeadersOnly, nNumBodyLines, nFromIndex, nToIndex, oBundleOut)
IF (nSuccess == 0)
? oMailman:LastErrorText
oMailman:destroy()
oBundleOut:destroy()
RETURN
ENDIF
oMailman:destroy()
oBundleOut:destroy()