Giter Club home page Giter Club logo

atarashii_imap's Introduction

新しい 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::{Client, Response, SslMode};
use native_tls::{TlsConnector, TlsConnectorBuilder, TlsStream, SslMethod, SslConnectorBuilder};
//.......

match Client::connect("imap.gmail.com") {
  Ok(mut client) => {
    match conn.authenticate("[email protected]", "password") {
        //todo

        // doing stuff with client
        // ............

        client.disconnect();
      },

      Err(e) => println!("authentication error")
    }
  },

  Err(e) => panic!("connection error")
}

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 | [email protected]

License

Apache 2.0

atarashii_imap's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.