Skip to content

Commit fb9ec86

Browse files
committed
Merge branch 'release/0.2.3'
2 parents 5c92b21 + 1d2caf8 commit fb9ec86

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2.3
2+
3+
- Fix #13 by refreshing capabilities list after successful tls negotiation
4+
- Expose capabilities list and accepted auth methods
5+
16
## 0.2.2
27

38
- Merge #10, fix string with leading escaped character

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,8 @@ await client.authenticate(new ImapPlainAuth("username", "password"));
109109
To close the connection, `logout` can either be called in a folder or the client itself.
110110

111111
## Features and bugs
112-
Please file feature requests and bugs at the [issue tracker](https://github.com/michaelspiss/imap_client/issues).
112+
Feel free to contribute to this project.
113+
114+
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).
115+
116+
If you fixed a bug or implemented a new feature, please send a [pull request](https://github.com/michaelspiss/imap_client/pulls).

lib/src/imap_client.dart

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ class ImapClient extends _ImapCommandable {
122122
});
123123
// Negotiate tls
124124
_engine._setSocket(await SecureSocket.secure(_engine._socket));
125+
// refresh capabilities list
126+
await capability();
125127
return response;
126128
}
127129

lib/src/imap_commandable.dart

+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ part of imap_client;
44
abstract class _ImapCommandable {
55
ImapEngine _engine;
66

7+
/// Gets full server capabilities list
8+
List<String> getCapabilities() {
9+
return UnmodifiableListView(_engine._capabilities);
10+
}
11+
12+
/// Checks if server has capability
13+
bool hasCapability(String capability) {
14+
return _engine.hasCapability(capability.toUpperCase());
15+
}
16+
17+
/// Gets all available authentication methods
18+
List<String> getAuthenticationMethods() {
19+
return UnmodifiableListView(_engine._serverAuthCapabilities);
20+
}
21+
722
/// Sends custom command. Command must not include CRLF (\r\n)!
823
///
924
/// Untagged handler maps must have keys in UPPERCASE!

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: imap_client
22
description: An interface to get emails via the imap protocol (version 4rev1)
3-
version: 0.2.2
3+
version: 0.2.3
44
homepage: https://github.com/michaelspiss/imap_client
55
author: Michael Spiss <[email protected]>
66
documentation:

0 commit comments

Comments
 (0)