| Crates.io | ephemeral_email |
| lib.rs | ephemeral_email |
| version | 0.2.0 |
| created_at | 2025-03-03 19:36:35.574286+00 |
| updated_at | 2025-03-08 10:50:46.360513+00 |
| description | A Rust library for generating temporary email addresses. |
| homepage | |
| repository | https://github.com/henrikwiller/ephemeral_email |
| max_upload_size | |
| id | 1576201 |
| size | 129,992 |
ephemeral_email is a Rust library for creating and managing temporary email addresses effortlessly.
It allows developers to generate disposable email addresses, fetch messages from temporary inboxes,
and supports multiple email providers. This is particularly useful for testing, avoiding spam, or
any scenario where a temporary email address is needed. With support for 42 domains and a straightforward
API, ephemeral_email simplifies handling temporary emails in your Rust applications.
You can use the following email providers for temporary email addresses:
This library is not affiliated with, endorsed by, or associated with the email providers listed above. Use this library at your own risk. Users are responsible for ensuring their use of the email providers' services complies with the respective terms of service and any applicable laws and regulations. The author assumes no responsibility for any misuse or legal issues that may arise from using this library.
Add the following to your Cargo.toml:
[dependencies]
ephemeral_email = "0.2"
Example usage:
use ephemeral_email::{ProviderType, TempMail};
#[tokio::main]
async fn main() {
let inbox = TempMail::new()
.provider_type(ProviderType::FakeMailNet)
.name("test")
.create_inbox()
.await
.unwrap();
println!("Created inbox with email: {}", inbox.get_email_address());
let messages = inbox.get_messages().await.unwrap();
println!("Got {} messages:", messages.len());
for message in messages {
println!("From: {}", message.from);
}
}
By default, ephemeral_email uses reqwest for making web requests. However, providers that use Cloudflare
cannot be accessed this way. To support these providers, ephemeral_email can use rquest to emulate browsers
like Chrome or Firefox. This feature is gated behind a feature flag. Note that rquest is incompatible with
crates that depend on openssl-sys, such as reqwest. To use rquest, enable the use-rquest feature flag
and disable the default use-reqwest feature. For build issues, refer to the rquest documentation.
[dependencies]
ephemeral_email = { version = "0.2", default-features = false, features = ["use-rquest"] }
Check out these related crates:
If you are a representative of an email provider listed in this library and would like to request removal or have any concerns, please contact us at ephemeral_email@hwiller.com.
License: MIT