Sample code for 30+ languages & platforms
Visual FoxPro

IMAP NOOP Command

Demonstrates how to send an IMAP NOOP command using SendRawCommand.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loImap
LOCAL lcResp

lnSuccess = 0

*  This example assumes the Chilkat API to have been previously unlocked.
*  See Global Unlock Sample for sample code.

loImap = CreateObject('Chilkat.Imap')

*  Connect to an IMAP server.
*  Use TLS
loImap.Ssl = 1
loImap.Port = 993
lnSuccess = loImap.Connect("imap.example.com")
IF (lnSuccess <> 1) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    CANCEL
ENDIF

*  Login
lnSuccess = loImap.Login("****","****")
IF (lnSuccess <> 1) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    CANCEL
ENDIF

*  Send a NOOP command
lcResp = loImap.SendRawCommand("NOOP")
? lcResp

*  Disconnect from the IMAP server.
lnSuccess = loImap.Disconnect()

RELEASE loImap