Sample code for 30+ languages & platforms
Lianja

IMAP NOOP Command

Demonstrates how to send an IMAP NOOP command using SendRawCommand.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

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

loImap = createobject("CkImap")

// Connect to an IMAP server.
// Use TLS
loImap.Ssl = .T.
loImap.Port = 993
llSuccess = loImap.Connect("imap.example.com")
if (llSuccess <> .T.) then
    ? loImap.LastErrorText
    release loImap
    return
endif

// Login
llSuccess = loImap.Login("****","****")
if (llSuccess <> .T.) then
    ? loImap.LastErrorText
    release loImap
    return
endif

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

// Disconnect from the IMAP server.
llSuccess = loImap.Disconnect()


release loImap