新しい (atarashii/new) IMAP client in Rust. It supports plain and secure connections.
It's under development...
Put this in your Cargo.toml
:
toml
[dependencies]
atarashii_imap = "<current version of atarashii_imap>"
```rust extern crate atarashii_imap; extern crate openssl;
use atarashii_imap::{Connection, Response}; use openssl::ssl::{SslContext, SslStream}; use openssl::ssl::SslMethod::Sslv23;
//....... match Connection::opensecure("imap.gmail.com", SslContext::new(Sslv23).unwrap(), "gmaillogin@gmail.com", "password") { Ok(mut conn) => { match conn.select("inbox") { Ok(selres) => { println!("select cmd result: {}", selres); }, Err(e) => println!("select cmd error") } }, Err(e) => panic!("Unable to open connection") }
```
Alex Maslakov | me@gildedhonour.com
Apache 2.0