Sample code for 30+ languages & platforms
Dart Requires Chilkat v11.0.0+

Example: MailMan.FetchAll method

Demonstrates how to call the FetchAll method.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  final mailman = CkMailMan();

  // Setup mailman with POP3 server and login settings...
  // ...
  // ...

  final bundle = CkEmailBundle();
  final keepOnServer = true;
  final headersOnly = false;
  // numBodyLines only applies if downloading headers-only.
  final numBodyLines = 0;

  try {
    mailman.fetchAll(keepOnServer, headersOnly, numBodyLines, bundle);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  // ...
  // ...
}