Verify email addresses in real time. Check deliverability, detect disposable and catch-all domains, and clean your email lists before sending.
Powered by Enrow -- real-time SMTP-level verification with high accuracy on catch-all domains.
Add to your Cargo.toml:
[dependencies]
email-verifier = "1.0"
tokio = { version = "1", features = ["full"] }use email_verifier::{verify_email, get_verification_result, VerifyEmailParams};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let params = VerifyEmailParams {
email: "tcook@apple.com".into(),
webhook: None,
};
let verification = verify_email("your_api_key", ¶ms).await?;
let result = get_verification_result("your_api_key", &verification.id).await?;
println!("{}", result.email.unwrap_or_default()); // tcook@apple.com
println!("{}", result.qualification.unwrap_or_default()); // valid
Ok(())
}verify_email returns a verification ID. The verification runs asynchronously -- call get_verification_result to retrieve the result once it's ready. You can also pass a webhook URL to get notified automatically.
use email_verifier::{verify_emails, get_verification_results, VerifyEmailsParams, BulkVerification};
let params = VerifyEmailsParams {
verifications: vec![
BulkVerification {
email: "tcook@apple.com".into(),
custom: None,
},
BulkVerification {
email: "satya@microsoft.com".into(),
custom: None,
},
BulkVerification {
email: "jensen@nvidia.com".into(),
custom: None,
},
],
webhook: None,
};
let batch = verify_emails("your_api_key", ¶ms).await?;
// batch.batch_id, batch.total, batch.status
let results = get_verification_results("your_api_key", &batch.batch_id).await?;
// results.results -- Vec<VerificationResult>Up to 5,000 verifications per batch. Pass a webhook URL to get notified when the batch completes.
match verify_email("bad_key", ¶ms).await {
Ok(result) => println!("Verified: {:?}", result),
Err(e) => {
// e contains the API error description
// Common errors:
// - "Invalid or missing API key" (401)
// - "Your credit balance is insufficient." (402)
// - "Rate limit exceeded" (429)
eprintln!("Error: {}", e);
}
}Register at app.enrow.io to get your API key. You get 50 free credits (= 200 verifications) with no credit card required. Each verification costs 0.25 credits.
Paid plans start at $17/mo for 1,000 credits up to $497/mo for 100,000 credits. See pricing.
- Enrow API documentation
- Full Enrow SDK -- includes email finder, phone finderand more
MIT -- see LICENSE for details.