atarashii_imap

Crates.ioatarashii_imap
lib.rsatarashii_imap
version0.3.0
sourcesrc
created_at2016-06-12 10:04:08.895249
updated_at2017-05-16 04:35:19.832153
descriptionIMAP client written in Rust
homepagehttps://github.com/GildedHonour/atarashii_imap
repositoryhttps://github.com/GildedHonour/atarashii_imap
max_upload_size
id5360
size31,392
Alex Maslakov (GildedHonour)

documentation

https://github.com/GildedHonour/atarashii_imap

README

新しい IMAP client Build Status crates.io

新しい (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

Commit count: 72

cargo fmt