24 releases

0.10.2 Oct 14, 2024
0.10.0 Aug 30, 2024
0.9.7 Jan 30, 2024
0.9.5 Dec 11, 2023
0.1.1 Nov 16, 2019

#9 in Email

Download history 1368/week @ 2024-07-30 873/week @ 2024-08-06 1056/week @ 2024-08-13 1137/week @ 2024-08-20 1829/week @ 2024-08-27 818/week @ 2024-09-03 783/week @ 2024-09-10 879/week @ 2024-09-17 899/week @ 2024-09-24 1234/week @ 2024-10-01 919/week @ 2024-10-08 1031/week @ 2024-10-15 1317/week @ 2024-10-22 1524/week @ 2024-10-29 1008/week @ 2024-11-05 772/week @ 2024-11-12

4,824 downloads per month
Used in 8 crates

MIT/Apache

225KB
5K SLoC

async-imap

Async implementation of IMAP


Based on the great rust-imap library.

This crate lets you connect to and interact with servers that implement the IMAP protocol (RFC 3501 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. It supports at least the latest three stable Rust releases (possibly even older ones; check the CI results).

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.

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!

See the examples/ directory for examples.

Running the test suite

To run the integration tests, you need to have GreenMail running. The easiest way to do that is with Docker:

$ docker pull greenmail/standalone:1.5.9
$ docker run -t -i -e GREENMAIL_OPTS='-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose' -p 3025:3025 -p 3110:3110 -p 3143:3143 -p 3465:3465 -p 3993:3993 -p 3995:3995 greenmail/standalone:1.5.9

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~4–16MB
~222K SLoC