Chilkat2-Python
Chilkat2-Python
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat Chilkat2-Python Downloads
import sys
import chilkat2
success = False
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
imap = chilkat2.Imap()
# Connect to an IMAP server.
# Use TLS
imap.Ssl = True
imap.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()