check-if-email-exists
repository·master·Indexed 27 days ago
https://github.com/reacherhq/check-if-email-existsAn open-source tool and API for verifying if an email address exists and is reachable without sending an email. It provides syntax validation, DNS/MX record checks, and SMTP server verification. Available as a Rust library, a CLI tool, and a Docker-based HTTP backend (reacher_backend v0.11.7) with support for SOCKS5 proxies and horizontal scaling via RabbitMQ or AWS SQS.
What's inside check-if-email-exists
- Reacher is an open-source email verification API designed to ensure email deliverability, clean email lists, and prevent bounces. It supports both individual email checks and bulk verification processes.
Understand Reacher Licensing (AGPL-3.0 vs Commercial)
masterReacher is available under two licensing models depending on your use case:
Open-Source (AGPL-3.0)
Reacher is distributed under the AGPL-3.0 license. This is suitable for projects that are also open-source.
Critical Restriction: If you integrate Reacher into a web service or proprietary software under the AGPL-3.0, you are required to make your entire source code (including any modifications) publicly available under the same license.
Commercial License
If you intend to integrate Reacher into proprietary software or services and do not wish to make your own source code public, you must obtain a Commercial License. This allows you to use the software without the copyleft requirements of the AGPL-3.0.
Note that both licenses provide access to the exact same Reacher software functionality.
Compare Reacher SaaS and Self-Hosting options
masterReacher offers two deployment models: SaaS for managed cloud usage and Self-Hosting for full infrastructure control. Choose based on your volume requirements, data privacy needs, and maintenance capacity.
Comparison Summary
Feature SaaS Self-Hosting Volume Limited to 10k verifications per month Unlimited verifications Cost Monthly subscription Monthly subscription + server costs + optional proxy costs Setup Time Instant Requires installation and setup Maintenance Fully managed by Reacher Managed by your IT team Data Ownership Data stored on Reacher servers Full ownership; no data sent to Reacher Bulk Verification Not supported Supported Reacher SaaS
- Access: https://app.reacher.email
- Best for: Users who want instant setup and zero infrastructure management.
- Capabilities: Verify emails directly via the Reacher Dashboard.
Self-Hosting Reacher
- Best for: Users requiring unlimited volume, bulk verification, or strict data sovereignty.
- Capabilities: Provides full control over the environment and data using the same verification engine as the SaaS version.
- Note: Self-hosting can be part of a Commercial License Trial via the
install.mdguide.
Understand Commercial License Trial limitations
masterThe Commercial License Trial is intended for internal testing and non-commercial purposes only. It has the following constraints:
- Proxy: Uses embedded Proxy4Smtp for SMTP verifications to ensure reliability in cloud environments.
- Rate Limits: Capped at 60 verifications per minute and 10,000 verifications per day.
- Usage Tracking: Anonymized verification results are sent to Reacher to monitor usage and detect abuse.
- Prohibition: Cannot be used in production environments for commercial applications. Abuse will result in an immediate account ban.
Use check-if-email-exists in Rust
masterTo use the library programmatically in a Rust project, add it to your
Cargo.toml:[dependencies] check-if-email-exists = "0.9"Then, use
check_emailwithCheckEmailInputto perform asynchronous verification:use check_if_email_exists::{check_email, CheckEmailInput, CheckEmailInputProxy}; async fn check() { // Create input with the email(s) to test let mut input = CheckEmailInput::new(vec!["someone@gmail.com".into()]); // Verify the email using async/await let result = check_email(&input).await; // result is a Vec<CheckEmailOutput> println!("{:?}", result); }use check_if_email_exists::{check_email, CheckEmailInput, CheckEmailInputProxy}; async fn check() { // Let's say we want to test the deliverability of someone@gmail.com. let mut input = CheckEmailInput::new(vec!["someone@gmail.com".into()]); // Verify this email, using async/await syntax. let result = check_email(&input).await; // `result` is a `Vec<CheckEmailOutput>`, where the CheckEmailOutput // struct contains all information about our email. println!("{:?}", result); }Configure Reacher Backend via Docker Environment Variables
masterYou can configure Reacher by passing environment variables to the Docker container using the
-eflag. Each configuration parameter in the TOML file has a corresponding environment variable prefixed withRCH__.Common backend configuration variables include:
RCH__BACKEND_NAME: Name to identify the backend.RCH__HTTP_HOST: Host to bind the backend to.RCH__HTTP_PORT: Port for the backend.RCH__HELLO_NAME: Name used during the SMTP EHLO/HELO command (ideally matching the server's reverse DNS).RCH__FROM_EMAIL: Email used during the SMTP MAIL FROM command.RCH__SMTP_TIMEOUT: Timeout for each SMTP connection in seconds.RCH__HEADER_SECRET: Shared secret required in thex-reacher-secretheader of incoming requests.RCH__SENTRY_DSN: Sentry DSN for error reporting.RCH__WEBDRIVER_ADDR: Address of the Chrome WebDriver server for headless verifications.
Use the check-if-email-exists CLI
masterThe CLI allows you to check if an email address exists directly from your terminal without connecting to a backend.
Basic Usage:
check_if_email_exists <TO_EMAIL>Enable Debug Logs: To see detailed debug logs during execution, set the
RUST_LOGenvironment variable:RUST_LOG=debug check_if_email_exists <TO_EMAIL>Use a Custom TOML Configuration File with Docker
masterInstead of passing individual environment variables, you can mount a complete
backend_config.tomlfile into the container.It is recommended to also pass
-e RUST_LOG=reacher=debugto see the final parsed configuration in the logs.docker run -e RUST_LOG=reacher=debug -v /path/to/local/backend_config.toml:./backend_config.toml -p 8080:8080 reacherhq/backend:betaDefine routing rules for email providers
masterAfter defining your proxies, you can route specific email providers to specific proxies using routing rules. Rules are applied based on the MX host.
Routing Variable Pattern:
RCH__OVERRIDES__{email-provider}__TYPE=smtpRCH__OVERRIDES__{email-provider}__PROXY={your-proxy-id-lowercase}
Supported
{email-provider}values (must be uppercase):GMAILHOTMAILB2BHOTMAILB2CPROOFPOINTMIMECASTYAHOO
Important Notes:
{your-proxy-id-lowercase}must match the lowercase version of the ID you defined in the proxy list.- Any email that does not match an override rule will automatically use the default proxy.
Scale Reacher using Pure Serverless Architecture
masterDeploy Reacher as a stateless function using serverless platforms like AWS Lambda or Google Cloud Functions.
Benefits:
- Infinite horizontal scaling.
- No infrastructure management.
Considerations:
- Increased complexity in managing rate-limiting and proxy usage.
- Potentially higher costs for large-scale, constant usage.
Verify an email using the Reacher API
masterIntegrate Reacher into your applications by using the REST API.
- Create an account at https://app.reacher.email to obtain a unique API token.
- Send a
POSTrequest tohttps://api.reacher.email/v0/check_emailwith your API token in theauthorizationheader and the target email in a JSON body under the keyto_email.
curl -X POST \ https://api.reacher.email/v0/check_email \ -H 'content-type: application/json' \ -H 'authorization: <YOUR_API_TOKEN>' \ -d '{"to_email": "amaury@reacher.email"}'Scale Reacher using Dedicated Servers
masterInstall Reacher on dedicated servers to maintain complete control over IP maintenance and independence from 3rd-party proxies.
Benefits:
- Complete control over IP quality.
- Independence from 3rd-party proxies.
Considerations:
- Limited scalability compared to cloud-based solutions.
- Higher initial infrastructure costs.