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

Example: MailMan.FetchAll method

Demonstrates how to call the FetchAll method.

Chilkat React Native Downloads

React Native
import { EmailBundle, MailMan } from '@chilkat/react-native'

async function chilkatExample() {
  const mailman = new MailMan();

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

  const bundle = new EmailBundle();
  const keepOnServer = true;
  const headersOnly = false;
  // numBodyLines only applies if downloading headers-only.
  const numBodyLines = 0;

  try {
    await mailman.fetchAllAsync(keepOnServer, headersOnly, numBodyLines, bundle);
  } catch {
    console.log(mailman.lastErrorText);
    return;
  }

  // ...
  // ...
}