Visual FoxPro
Visual FoxPro
Transition from MailMan.FetchSingleHeader to MailMan.FetchOne
Provides instructions for replacing deprecated FetchSingleHeader method calls with FetchOne.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loMailman
LOCAL lnNumBodyLines
LOCAL lnMsgnum
LOCAL loEmailObj
LOCAL lnHeaderOnly
LOCAL loEmailOut
lnSuccess = 0
loMailman = CreateObject('Chilkat.MailMan')
* ...
* ...
lnNumBodyLines = 5
lnMsgnum = 1
* ------------------------------------------------------------------------
* The FetchSingleHeader method is deprecated:
loEmailObj = loMailman.FetchSingleHeader(lnNumBodyLines,lnMsgnum)
IF (loMailman.LastMethodSuccess = 0) THEN
? loMailman.LastErrorText
RELEASE loMailman
CANCEL
ENDIF
* ...
* ...
RELEASE loEmailObj
* ------------------------------------------------------------------------
* Do the equivalent using FetchOne.
* Your application creates a new, empty Email object which is passed
* in the last argument and filled upon success.
lnHeaderOnly = 1
loEmailOut = CreateObject('Chilkat.Email')
lnSuccess = loMailman.FetchOne(lnHeaderOnly,lnNumBodyLines,lnMsgnum,loEmailOut)
IF (lnSuccess = 0) THEN
? loMailman.LastErrorText
RELEASE loMailman
RELEASE loEmailOut
CANCEL
ENDIF
RELEASE loMailman
RELEASE loEmailOut