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

Transition from Email.GetAttachedMessage to Email.GetAttachedEmail

Provides instructions for replacing deprecated GetAttachedMessage method calls with GetAttachedEmail.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loEmail = createobject("CkEmail")

//  ...
//  ...
lnIndex = 0

//  ------------------------------------------------------------------------
//  The GetAttachedMessage method is deprecated:

loEmailObj = loEmail.GetAttachedMessage(lnIndex)
if (loEmail.LastMethodSuccess = .F.) then
    ? loEmail.LastErrorText
    release loEmail
    return
endif

//  ...
//  ...

release loEmailObj

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

loEmailOut = createobject("CkEmail")
llSuccess = loEmail.GetAttachedEmail(lnIndex,loEmailOut)
if (llSuccess = .F.) then
    ? loEmail.LastErrorText
    release loEmail
    release loEmailOut
    return
endif



release loEmail
release loEmailOut