imap_client 0.1.2 imap_client: ^0.1.2 copied to clipboard
An interface to get emails via the imap protocol (version 4rev1)
example/imap_client_example.dart
import "package:imap_client/imap_client.dart";
main() async {
ImapClient client = new ImapClient();
await client.connect("imap.gmail.com", 993, true).then((response) {
print(response.fullResponse);
});
await client.capability().then((response) {
print(response.untagged['CAPABILITY']);
});
await client.noop();
await client
.authenticate("example@gmailcom", "verysecurepassword")
.then((response) {
print(response.status); // NO, because credentials are invalid
});
await client.logout().then((response) {
print(response.fullResponse);
});
}