imap_client 0.2.8 copy "imap_client: ^0.2.8" to clipboard
imap_client: ^0.2.8 copied to clipboard

outdated

IMAP (version 4rev1) implementation to get emails from an external server

example/example.dart

import 'package:imap_client/imap_client.dart';

main() async {
  // print log, helpful for debugging
  printImapClientDebugLog();

  ImapClient client = new ImapClient();
  // connect
  await client.connect("imap.gmail.com", 993, true);
  // authenticate
  await client.authenticate(new ImapPlainAuth("user@gmail.com", "password"));
  // get folder
  ImapFolder inbox = await client.getFolder("inbox");
  // get "BODY" for message 1
  print(await inbox.fetch(["BODY"], messageIds: [1]));
  // get "BODYSTRUCTURE" for message 1
  print(await inbox.fetch(["BODYSTRUCTURE"], messageIds: [1]));
  // close connection
  await client.logout();
}
15
likes
40
pub points
63%
popularity

Publisher

unverified uploader

IMAP (version 4rev1) implementation to get emails from an external server

Repository (GitHub)
View/report issues
Contributing

License

GPL-3.0 (license)

Dependencies

logging, pedantic, utf7

More

Packages that depend on imap_client