Fix up README
This commit is contained in:
parent
bce4831ccb
commit
35acfeb108
2 changed files with 12 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
|
||||
name = "imap"
|
||||
version = "0.9.1"
|
||||
version = "0.9.2"
|
||||
authors = ["Matt McCoy <mattnenterprise@yahoo.com>",
|
||||
"Jon Gjengset <jon@thesquareplanet.com>"]
|
||||
documentation = "https://docs.rs/imap/"
|
||||
|
|
|
|||
17
README.md
17
README.md
|
|
@ -11,13 +11,18 @@
|
|||
[](https://coveralls.io/github/mattnenterprise/rust-imap?branch=master)
|
||||
|
||||
This crate lets you connect to and interact with servers that implement the IMAP protocol ([RFC
|
||||
3501](https://tools.ietf.org/html/rfc3501)). After authenticating with the server, IMAP lets
|
||||
you list, fetch, and search for e-mails, as well as monitor mailboxes for changes.
|
||||
3501](https://tools.ietf.org/html/rfc3501) and various extensions). After authenticating with
|
||||
the server, IMAP lets you list, fetch, and search for e-mails, as well as monitor mailboxes for
|
||||
changes.
|
||||
|
||||
To connect, use the `imap::connect` function. This gives you an unauthenticated `imap::Client`. You can
|
||||
then use `Client::login` or `Client::authenticate` to perform username/password or
|
||||
To connect, use the [`connect`] function. This gives you an unauthenticated [`Client`]. You can
|
||||
then use [`Client::login`] or [`Client::authenticate`] to perform username/password or
|
||||
challenge/response authentication respectively. This in turn gives you an authenticated
|
||||
`Session`, which lets you access the mailboxes at the server.
|
||||
[`Session`], which lets you access the mailboxes at the server.
|
||||
|
||||
The documentation within this crate borrows heavily from the various RFCs, but should not be
|
||||
considered a complete reference. If anything is unclear, follow the links to the RFCs embedded
|
||||
in the documentation for the various types and methods and read the raw text there!
|
||||
|
||||
Below is a basic client example. See the `examples/` directory for more.
|
||||
|
||||
|
|
@ -52,7 +57,7 @@ fn fetch_inbox_top() -> imap::error::Result<Option<String>> {
|
|||
};
|
||||
|
||||
// extract the message's body
|
||||
let body = message.rfc822().expect("message did not have a body!");
|
||||
let body = message.body().expect("message did not have a body!");
|
||||
let body = std::str::from_utf8(body)
|
||||
.expect("message was not valid utf-8")
|
||||
.to_string();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue