gmailnator 0.1.0

An unofficial api wrapper to interact with https://gmailnator.com/
Documentation
gmailnator-0.1.0 has been yanked.

Goals

This library has been designed to be ultra high level and simple (see the examples below). Performance has been taken in account but the host's slowness in a real bottleneck.

Examples

The main object is the GmailnatorInbox object, to generate a new mailbox :

extern crate gmailnator;
use gmailnator::mail::GmailnatorInbox;
...
let inbox = GmailnatorInbox::new().expect("Error occured when creating the inbox.");

Getting the current email address string associated to the GmailnatorInbox instance :

let address = inbox.get_address(); returns an &str

Display potentially received messages :

let messages = inbox.get_messages().expect("Failed to retrieve messages.");

for message in messages {

    let title = message.get_title();
    let body = message.get_raw_content();

    println!("Title : {}\nBody : {}", title, body);

}