C#
C#
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat C# Downloads
bool success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Chilkat.Imap imap = new Chilkat.Imap();
// Connect to an IMAP server.
// Use TLS
imap.Ssl = true;
imap.Port = 993;
success = imap.Connect("imap.example.com");
if (success != true) {
Debug.WriteLine(imap.LastErrorText);
return;
}
// Login
success = imap.Login("****","****");
if (success != true) {
Debug.WriteLine(imap.LastErrorText);
return;
}
// Send a NOOP command
string resp = imap.SendRawCommand("NOOP");
Debug.WriteLine(resp);
// Disconnect from the IMAP server.
success = imap.Disconnect();