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

Transition from MailMan.FetchEmail to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchEmail method calls with FetchByUidl.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loMailman = createobject("CkMailMan")

//  ...
//  ...

lcUidl = "123"

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

loEmailObj = loMailman.FetchEmail(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 = .F.
//  Irrelevant because we are not downloading headers-only.
lnNumBodyLines = 0

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