| Crates.io | postmark |
| lib.rs | postmark |
| version | 0.11.4 |
| created_at | 2021-07-06 13:20:26.971317+00 |
| updated_at | 2025-08-07 14:54:38.611433+00 |
| description | Postmark rust client |
| homepage | https://github.com/pastjean/postmark-rs |
| repository | https://github.com/pastjean/postmark-rs |
| max_upload_size | |
| id | 419447 |
| size | 167,470 |
A rust library to query Postmark API.
Add the crate dependency to your Cargo.toml:
[dependencies]
postmark = "x.y.z"
And use it, see documentation at: https://docs.rs/postmark.
use postmark::api::email::SendEmailRequest;
use postmark::api::Body;
use postmark::reqwest::PostmarkClient;
use postmark::Query;
async fn send_email(){
let client = PostmarkClient::builder()
.server_token("<sometoken>")
.build();
let req = SendEmailRequest::builder()
.from("me@example.com")
.to("you@example.com")
.body(Body::text("it's me, Mario!".to_string()))
.build();
let resp = req.execute(&client).await;
}
Prerequisite:
cargo install cargo-release
On Release:
cargo release --dry-run
# check it does the good thing
cargo release
This crate's API design is heavily inspired by the article "Designing Rust bindings for REST APIs by Ben Boeckel.
postmark-rs is dual-licensed under either: