- this allows a more transparent and versatile usage of the library as one can simply compile it as-is and then use the builder to configure where we connect and how we connect without having to be concerned about what type is used for the imap::Client / imap::Session
In addition to the invalid character, the error now also contains a
`command_synopsis` and `argument` which identifies the command and
argument that failed to validate.
While IDLE, the server sends unilateral responses to notify the client of
changes to the mailbox as they happen. Instead of always exiting the IDLE
on any change, allow the caller to pass a callback function which receives
the messages and returns an action to either Continue IDLE or Stop and exit.
For clients wishing to use the previous behaviour, a callback_stop convenience
function is provided that terminates the IDLE on any change to the mailbox.
These messages show up at an interval controlled by Dovecot's
imap_idle_notify_interval setting, which defaults to 2 minutes.
These messages were causing the IDLE loop to exit prematurely
because it looks like a notification response from the server.
Establishes conditional compilation for all integration with the
native_tls crate in this crate. Since native_tls has been deeply
integrated into this crate for a long time, we want to maintain
backwards compatibility by making this feature part of the default.
For a consumer of this crate to "opt-out", including this in
cargo.toml:
```
[dependencies.imap]
version = 0.16.0 # Replace this with the correct version
default-features = false
```
See the conversation on Github for details on this approach:
https://github.com/jonhoo/rust-imap/issues/123