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

outdated

An interface to get emails via the imap protocol (version 4rev1)

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
63%
popularity

Publisher

unverified uploader

An interface to get emails via the imap protocol (version 4rev1)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

logging, pedantic

More

Packages that depend on imap_client