Skip to content

Commit

Permalink
Merge branch 'release/0.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelspiss committed May 18, 2019
2 parents 5c92b21 + 1d2caf8 commit fb9ec86
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.3

- Fix #13 by refreshing capabilities list after successful tls negotiation
- Expose capabilities list and accepted auth methods

## 0.2.2

- Merge #10, fix string with leading escaped character
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,8 @@ await client.authenticate(new ImapPlainAuth("username", "password"));
To close the connection, `logout` can either be called in a folder or the client itself.

## Features and bugs
Please file feature requests and bugs at the [issue tracker](https://github.com/michaelspiss/imap_client/issues).
Feel free to contribute to this project.

If you find a bug or think of a new feature, but don't know how to fix/implement it, please [open an issue](https://github.com/michaelspiss/imap_client/issues).

If you fixed a bug or implemented a new feature, please send a [pull request](https://github.com/michaelspiss/imap_client/pulls).
2 changes: 2 additions & 0 deletions lib/src/imap_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ class ImapClient extends _ImapCommandable {
});
// Negotiate tls
_engine._setSocket(await SecureSocket.secure(_engine._socket));
// refresh capabilities list
await capability();
return response;
}

Expand Down
15 changes: 15 additions & 0 deletions lib/src/imap_commandable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ part of imap_client;
abstract class _ImapCommandable {
ImapEngine _engine;

/// Gets full server capabilities list
List<String> getCapabilities() {
return UnmodifiableListView(_engine._capabilities);
}

/// Checks if server has capability
bool hasCapability(String capability) {
return _engine.hasCapability(capability.toUpperCase());
}

/// Gets all available authentication methods
List<String> getAuthenticationMethods() {
return UnmodifiableListView(_engine._serverAuthCapabilities);
}

/// Sends custom command. Command must not include CRLF (\r\n)!
///
/// Untagged handler maps must have keys in UPPERCASE!
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: imap_client
description: An interface to get emails via the imap protocol (version 4rev1)
version: 0.2.2
version: 0.2.3
homepage: https://github.com/michaelspiss/imap_client
author: Michael Spiss <michaelspiss.dev@mailbox.org>
documentation:
Expand Down

0 comments on commit fb9ec86

Please sign in to comment.