Dart
Dart
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
final imap = CkImap();
// Connect to an IMAP server.
// Use TLS
imap.ssl = true;
imap.port = 993;
try {
imap.connect('imap.example.com');
} on ChilkatException catch (e) {
print(e.lastErrorText);
return;
}
// Login
try {
imap.login('****', '****');
} on ChilkatException catch (e) {
print(e.lastErrorText);
return;
}
// Send a NOOP command
final resp = imap.sendRawCommand('NOOP');
print(resp);
// Disconnect from the IMAP server.
imap.disconnect();
}