Skip to main content

Crate mailisk

Crate mailisk 

Source
Expand description

Typed async Rust client for the Mailisk API.

Mailisk is an email, SMS, outbound email, and TOTP testing platform. This crate mirrors the Mailisk Node and Python clients: the same endpoints, the same search defaults, and request/response types that match the REST API’s JSON fields.

use mailisk::{MailiskClient, SearchInboxParams};

let mailisk = MailiskClient::new("YOUR_API_KEY")?;

// Waits until an email arrives for this address (up to 5 minutes).
let result = mailisk
    .search_inbox(
        "mynamespace",
        &SearchInboxParams {
            to_addr_prefix: Some("john@mynamespace.mailisk.net".into()),
            ..Default::default()
        },
    )
    .await?;

for email in result.data {
    println!("{:?}", email.subject);
}

Re-exports§

pub use types::*;

Modules§

types
Request parameters and response bodies for the Mailisk API.

Structs§

MailiskClient
Async client for the Mailisk API.
MailiskClientBuilder
Builder for MailiskClient, created with MailiskClient::builder.
RequestOptions
Per-request options for the waiting search endpoints and attachment downloads.

Enums§

Error
Errors returned by MailiskClient.

Constants§

VERSION
Version of this crate.

Type Aliases§

Result
Convenience alias for results returned by this crate.