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

Transition from MailMan.FetchSingleHeaderByUidl to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchSingleHeaderByUidl method calls with FetchByUidl.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oMailman
LOCAL nNumBodyLines
LOCAL cUidl
LOCAL oEmailObj
LOCAL nHeaderOnly
LOCAL oEmailOut

nSuccess := 0

oMailman := CreateObject("Chilkat.MailMan")

//  ...
//  ...

nNumBodyLines := 5
cUidl := "123"

//  ------------------------------------------------------------------------
//  The FetchSingleHeaderByUidl method is deprecated:

oEmailObj := oMailman:FetchSingleHeaderByUidl(nNumBodyLines, cUidl)
IF (oMailman:LastMethodSuccess == 0)
    ? oMailman:LastErrorText
    oMailman:destroy()
    RETURN
ENDIF

//  ...
//  ...

oEmailObj:destroy()

//  ------------------------------------------------------------------------
//  Do the equivalent using FetchByUidl.
//  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:FetchByUidl(cUidl, nHeaderOnly, nNumBodyLines, oEmailOut)
IF (nSuccess == 0)
    ? oMailman:LastErrorText
    oMailman:destroy()
    oEmailOut:destroy()
    RETURN
ENDIF

oMailman:destroy()
oEmailOut:destroy()