3 unstable releases
Uses old Rust 2015
0.3.0 | May 16, 2017 |
---|---|
0.2.1 | Jun 25, 2016 |
0.2.0 | Jun 12, 2016 |
#36 in #imap
20KB
446 lines
新しい IMAP client
新しい (atarashii/new) IMAP client in Rust. It supports plain and secure connections.
In progress
It's under development...
Usage
Put this in your Cargo.toml
:
[dependencies]
atarashii_imap = "<current version of atarashii_imap>"
Example
extern crate atarashii_imap;
extern crate openssl;
use atarashii_imap::{Connection, Response};
use openssl::ssl::{SslContext, SslStream};
use openssl::ssl::SslMethod::Sslv23;
//.......
match Connection::open_secure("imap.gmail.com", SslContext::new(Sslv23).unwrap(), "gmail_login@gmail.com", "password") {
Ok(mut conn) => {
match conn.select("inbox") {
Ok(sel_res) => {
println!("select cmd result: {}", sel_res);
},
Err(e) => println!("select cmd error")
}
},
Err(e) => panic!("Unable to open connection")
}
Commands supported
- select(mailbox_name: &str)
- examine(mailbox_name: &str)
- create(mailbox_name: &str)
- delete(mailbox_name: &str)
- rename(current_name: &str, new_name: &str)
- subscribe(mailbox_name: &str)
- unsubscribe(mailbox_name: &str)
- close
- logout
- capability
- fetch
- copy(seq_set: String, mailbox_name: String)
- list(folder_name: &str, search_pattern: &str)
- lsub(folder_name: &str, search_pattern: &str)
- expunge
- check
- noop
Author
Alex Maslakov | me@gildedhonour.com
License
Apache 2.0
Dependencies
~5.5MB
~119K SLoC