Visual FoxPro
Visual FoxPro
Transition from MailMan.FetchEmail to MailMan.FetchByUidl
Provides instructions for replacing deprecated FetchEmail method calls with FetchByUidl.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loMailman
LOCAL lcUidl
LOCAL loEmailObj
LOCAL lnHeaderOnly
LOCAL lnNumBodyLines
LOCAL loEmailOut
lnSuccess = 0
loMailman = CreateObject('Chilkat.MailMan')
* ...
* ...
lcUidl = "123"
* ------------------------------------------------------------------------
* The FetchEmail method is deprecated:
loEmailObj = loMailman.FetchEmail(lcUidl)
IF (loMailman.LastMethodSuccess = 0) THEN
? loMailman.LastErrorText
RELEASE loMailman
CANCEL
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.
lnHeaderOnly = 0
* Irrelevant because we are not downloading headers-only.
lnNumBodyLines = 0
loEmailOut = CreateObject('Chilkat.Email')
lnSuccess = loMailman.FetchByUidl(lcUidl,lnHeaderOnly,lnNumBodyLines,loEmailOut)
IF (lnSuccess = 0) THEN
? loMailman.LastErrorText
RELEASE loMailman
RELEASE loEmailOut
CANCEL
ENDIF
RELEASE loMailman
RELEASE loEmailOut