Sample code for 30+ languages & platforms
Visual FoxPro

Example: MailMan.FetchAll method

Demonstrates how to call the FetchAll method.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loMailman
LOCAL loBundle
LOCAL lnKeepOnServer
LOCAL lnHeadersOnly
LOCAL lnNumBodyLines

lnSuccess = 0

lnSuccess = 0
loMailman = CreateObject('Chilkat.MailMan')

* Setup mailman with POP3 server and login settings...
* ...
* ...

loBundle = CreateObject('Chilkat.EmailBundle')
lnKeepOnServer = 1
lnHeadersOnly = 0
* numBodyLines only applies if downloading headers-only.
lnNumBodyLines = 0

lnSuccess = loMailman.FetchAll(lnKeepOnServer,lnHeadersOnly,lnNumBodyLines,loBundle)
IF (lnSuccess = 0) THEN
    ? loMailman.LastErrorText
    RELEASE loMailman
    RELEASE loBundle
    CANCEL
ENDIF

* ...
* ...

RELEASE loMailman
RELEASE loBundle