mailtm-client

Crates.iomailtm-client
lib.rsmailtm-client
version0.1.15
sourcesrc
created_at2024-06-24 21:20:14.50721
updated_at2024-06-25 10:23:33.163279
descriptionAn asynchronous and simple client for Mail.tm.
homepagehttps://maxbeier.dev
repositoryhttps://github.com/Max-Beier/mailtm-client-rs
max_upload_size
id1282579
size8,779
Max Beier (Max-Beier)

documentation

README

MailTM Client

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(())
}
Commit count: 13

cargo fmt