(Visual FoxPro) IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.
LOCAL loImap
LOCAL lnSuccess
LOCAL lcResp
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Imap')
loImap = CreateObject('Chilkat.Imap')
* Connect to an IMAP server.
* Use TLS
loImap.Ssl = 1
loImap.Port = 993
lnSuccess = loImap.Connect("imap.someMailServer.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
|