Node.js
Node.js
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var 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) {
console.log(imap.LastErrorText);
return;
}
// Login
success = imap.Login("****","****");
if (success !== true) {
console.log(imap.LastErrorText);
return;
}
// Send a NOOP command
var resp = imap.SendRawCommand("NOOP");
console.log(resp);
// Disconnect from the IMAP server.
success = imap.Disconnect();
}
chilkatExample();