# guerrillamail-client
[](https://crates.io/crates/guerrillamail-client)
[](https://docs.rs/guerrillamail-client)
[](https://opensource.org/licenses/MIT)

An async Rust client for the [GuerrillaMail](https://www.guerrillamail.com) temporary email service.
## Features
- 🚀 **Async/await** - Built on tokio and reqwest
- 📧 **Create temporary emails** - Generate disposable email addresses
- 📬 **Check inbox** - Retrieve messages from your temporary inbox
- 🗑️ **Delete emails** - Clean up when done
- 🌐 **Proxy support** - Route requests through HTTP proxies
## Installation
Add to your `Cargo.toml`:
```toml
[dependencies]
guerrillamail = "0.3.1"
tokio = { version = "1", features = ["full"] }
```
## Quick Start
```rust
use guerrillamail::Client;
#[tokio::main]
async fn main() -> Result<(), guerrillamail::Error> {
// Create a new client
let client = Client::new().await?;
// Create a temporary email address
let email = client.create_email("myalias").await?;
println!("Temporary email: {}", email);
// Check for messages
let messages = client.get_messages(&email).await?;
for msg in messages {
println!("From: {}", msg.mail_from);
println!("Subject: {}", msg.mail_subject);
}
// Delete when done
client.delete_email(&email).await?;
Ok(())
}
```
If you need custom configuration (proxy, TLS, user agent), use the builder:
```rust
use guerrillamail::Client;
let client = Client::builder()
.proxy("http://127.0.0.1:8080")
.danger_accept_invalid_certs(false)
.user_agent("my-app/1.0")
.ajax_url("https://www.guerrillamail.com/ajax.php")
.build()
.await?;
```
## Acknowledgements
This library is a Rust port of [GuerrillaMail-Python](https://github.com/rino-snow/GuerrillaMail-Python).
## License
MIT License - see [license](license) for details.