Visual FoxPro
Visual FoxPro
Transition from Email.GetAttachedMessage to Email.GetAttachedEmail
Provides instructions for replacing deprecated GetAttachedMessage method calls with GetAttachedEmail.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loEmail
LOCAL lnIndex
LOCAL loEmailObj
LOCAL loEmailOut
lnSuccess = 0
loEmail = CreateObject('Chilkat.Email')
* ...
* ...
lnIndex = 0
* ------------------------------------------------------------------------
* The GetAttachedMessage method is deprecated:
loEmailObj = loEmail.GetAttachedMessage(lnIndex)
IF (loEmail.LastMethodSuccess = 0) THEN
? loEmail.LastErrorText
RELEASE loEmail
CANCEL
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('Chilkat.Email')
lnSuccess = loEmail.GetAttachedEmail(lnIndex,loEmailOut)
IF (lnSuccess = 0) THEN
? loEmail.LastErrorText
RELEASE loEmail
RELEASE loEmailOut
CANCEL
ENDIF
RELEASE loEmail
RELEASE loEmailOut