A tiny Rust web app that demonstrates sending a test email with the official parcelwing Rust SDK from crates.io.
It is intentionally small enough to use as both:
- A real-world smoke test for the Parcel Wing Rust SDK.
- A starter example for developers who want to send their first email from Rust.
- Axum web server
- Official
parcelwingSDK from crates.io - Browser form for entering an API key, sender, recipient, subject, and message body
- Optional
.envsupport without adding an extra dotenv dependency - Lightweight custom UI
- JSON response panel for queued emails or API errors
- Rust 1.75 or newer
- A Parcel Wing API key
- A verified sending domain in Parcel Wing
cargo runThen open:
http://localhost:8080
Paste your Parcel Wing API key, fill in the sender and recipient fields, and send a test email.
Copy the example env file:
cp .env.example .envThen edit:
PARCELWING_API_KEY=pw_live_your_api_key_here
PARCELWING_BASE_URL=https://parcelwing.com
PORT=8080The app still lets you override the API key and base URL from the UI. API keys are only used by the local server for the current request and are not stored by the app.
.
├── src
│ ├── env.rs
│ └── main.rs
├── static
│ └── styles.css
├── .env.example
├── .gitignore
├── Cargo.toml
├── LICENSE
└── README.md
- The browser posts the form to this local Rust server.
- The server creates a Parcel Wing SDK client.
- The SDK queues the email through
client.emails().send(...).