guerrillamail-client

An async Rust client for the GuerrillaMail temporary email service.
This crate lets you programmatically create disposable email addresses, poll inboxes, and fetch message contents using an idiomatic async Rust API built on tokio and reqwest.
β οΈ Unofficial API
GuerrillaMail does not provide a documented public API. This client reverse-engineers the web interface and may break if GuerrillaMail changes their frontend behavior.
When to use this
- Email-based testing (signups, verification emails, password resets)
- Automation and scraping workflows
- CI / integration tests that need a disposable inbox
- Security research and tooling
Not recommended for long-lived accounts or reliability-critical workflows.
Features
- π Async/await first β built on
tokioandreqwest - π§ Create temporary email addresses
- π¬ Poll inbox messages
- π Fetch full email contents
- ποΈ Forget/delete addresses
- π Proxy support (e.g. Burp, mitmproxy)
- π οΈ Configurable TLS + User-Agent
- π Well-typed errors with proper chaining
Installation
Add to your Cargo.toml:
[]
= "0.6.0"
= { = "1", = ["full"] }
Quick start
use Client;
async
Downloading attachments
use Client;
async
Configuration via builder
For proxies, stricter TLS, custom user agents, or a different request timeout, use the builder API:
use Client;
let client = builder
.proxy
.danger_accept_invalid_certs
.user_agent
.timeout // default is 30s; customize as needed
.build
.await?;
Error handling
All public APIs return a crate-level Error enum.
- Transport / HTTP issues β
Error::Request - Invalid or unexpected JSON β
Error::Json - Response shape changes (missing fields, schema drift) β
Error::ResponseParse - Bootstrap token failures β
Error::TokenParse
Underlying errors are preserved as sources, so tools like anyhow or eyre
can display full error chains.
Limitations & caveats
- GuerrillaMail inboxes are not permanent
- Messages may disappear at any time
- Address reuse is not guaranteed
- Rate limits and blocking are controlled by GuerrillaMail, not this crate
- API behavior may change without warning
Acknowledgements
This project was inspired by and partially based on
GuerrillaMail-Python.
Contributing
PRs are welcome!
Please run cargo fmt and cargo clippy before submitting.
If youβre changing behavior (e.g. stricter parsing), document it in the PR.
Support
If this crate saves you time or helps your work, support is appreciated:
License
This project is licensed under the MIT License; see license for details.