Crates.io | atarashii_imap |
lib.rs | atarashii_imap |
version | 0.3.0 |
source | src |
created_at | 2016-06-12 10:04:08.895249 |
updated_at | 2017-05-16 04:35:19.832153 |
description | IMAP client written in Rust |
homepage | https://github.com/GildedHonour/atarashii_imap |
repository | https://github.com/GildedHonour/atarashii_imap |
max_upload_size | |
id | 5360 |
size | 31,392 |
新しい (atarashii/new) IMAP client in Rust. It supports plain and secure connections.
It's under development...
Put this in your Cargo.toml
:
[dependencies]
atarashii_imap = "<current version of atarashii_imap>"
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")
}
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
Alex Maslakov | me@gildedhonour.com
Apache 2.0