Skip to content

insanitybit/typed-imap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

typed-imap

A typesafe client library for the IMAP protocol.

Currently in the fledgling stages. Entirely not working, no stable API.

Example

extern crate typed_imap;

use typed_imap::client::*;
use typed_imap::connection::IMAPConnection;

fn main() {
    let client = {
        let conn = IMAPConnection::new_tls("outlook.office365.com", 993).unwrap();
        NotAuthenticated::new(conn).unwrap()
    };

    let client = client.login("username", "passwd").unwrap();

    let mut client = client.select("inbox").unwrap();

    // We need to act on the mailbox in a new scope to prevent a situation where
    // a client has a mailbox but moves to a new state.
    {
        let mut mailbox = client.borrow_mailbox();
        let emails = mailbox.fetch("2:4", "BODY").unwrap();
    }

    client.logout();
}

See examples/ for more.

About

A rust library for a Type Safe IMAP protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages