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