CkPython
CkPython
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat CkPython Downloads
import sys
import chilkat
success = False
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
imap = chilkat.CkImap()
# Connect to an IMAP server.
# Use TLS
imap.put_Ssl(True)
imap.put_Port(993)
success = imap.Connect("imap.example.com")
if (success != True):
print(imap.lastErrorText())
sys.exit()
# Login
success = imap.Login("****","****")
if (success != True):
print(imap.lastErrorText())
sys.exit()
# Send a NOOP command
resp = imap.sendRawCommand("NOOP")
print(resp)
# Disconnect from the IMAP server.
success = imap.Disconnect()