Skip to content

Max-Beier/mailtm-client-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MailTM Client

crates.io crates.io Build status

An asynchronous and simple client for Mail.tm.

Getting started

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let account_credentials =
        mailtm_client::AccountCredentials::new("User123", "my_secret_password");

    let email_client = mailtm_client::Client::new(&account_credentials).await?;

    let mail;
    loop {
        if let Some(html) = email_client.request_latest_message_html().await? {
            mail = html;
            break;
        }
        tokio::time::sleep(std::time::Duration::from_secs(1)).await;
    }

    Ok(())
}

About

An asynchronous and simple client for Mail.tm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages