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

Transition from MailMan.FetchSingleHeaderByUidl to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchSingleHeaderByUidl method calls with FetchByUidl.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loMailman = createobject("CkMailMan")

//  ...
//  ...

lnNumBodyLines = 5
lcUidl = "123"

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

loEmailObj = loMailman.FetchSingleHeaderByUidl(lnNumBodyLines,lcUidl)
if (loMailman.LastMethodSuccess = .F.) then
    ? loMailman.LastErrorText
    release loMailman
    return
endif

//  ...
//  ...

release loEmailObj

//  ------------------------------------------------------------------------
//  Do the equivalent using FetchByUidl.
//  Your application creates a new, empty Email object which is passed 
//  in the last argument and filled upon success.

llHeaderOnly = .T.

loEmailOut = createobject("CkEmail")
llSuccess = loMailman.FetchByUidl(lcUidl,llHeaderOnly,lnNumBodyLines,loEmailOut)
if (llSuccess = .F.) then
    ? loMailman.LastErrorText
    release loMailman
    release loEmailOut
    return
endif



release loMailman
release loEmailOut