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

Transition from MailMan.FetchEmail to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchEmail method calls with FetchByUidl.

Chilkat Xbase++ Downloads

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

nSuccess := 0

oMailman := CreateObject("Chilkat.MailMan")

//  ...
//  ...

cUidl := "123"

//  ------------------------------------------------------------------------
//  The FetchEmail method is deprecated:

oEmailObj := oMailman:FetchEmail(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 := 0
//  Irrelevant because we are not downloading headers-only.
nNumBodyLines := 0

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()