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

outdated

IMAP (version 4rev1) implementation for dart

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
0
pub points
53%
popularity

Publisher

unverified uploader

IMAP (version 4rev1) implementation for dart

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

logging, pedantic, utf7

More

Packages that depend on imap_client