Skip to content
Open-Source Laravel Package
Laravel10x - 13x

Laravel Disposable Email Validator

Block Temporary Emails Before They Enter Your App.

Protect registrations, free trials, and lead forms with erag/laravel-disposable-email. Detect disposable email domains using local checks, custom blocklists, and automatic list updates. Enable optional RFC and DNS validation when needed.

$composer require erag/laravel-disposable-email
RegisterRequest.php
1public function rules(): array
2{
3  return [
4    'name'  => ['required', 'string', 'max:255'],
5    'email' => ['required', 'email', 'disposable_email'],
6  ];
7}
SIMULATED EXECUTION
< 0.02ms (Local Cache Hit)
INPUTInput: user@tempmail.com
422 Unprocessable"The selected email is a disposable address."
< 0.02msZero HTTP Overhead
124,220+Known Threat Domains
Custom BlacklistAdd Your Own Domains
100% OfflineGDPR & Privacy Safe
Daily Sync GitHub Actions Pipeline
Official Repo ↗Self-Maintained Blacklist
BLOCKED SAMPLES
mailinator.comBLOCKEDtempmail.comBLOCKED10minutemail.comBLOCKEDguerrillamail.comBLOCKEDsharklasers.comBLOCKEDyopmail.comBLOCKEDtrashmail.comBLOCKEDdispostable.comBLOCKEDfakeinbox.comBLOCKED0-mail.comBLOCKEDgetairmail.comBLOCKEDtemp-mail.orgBLOCKEDthrowawaymail.comBLOCKEDburnermail.ioBLOCKED

Disposable Email Validation Features

RULE

Flexible validation

Block temporary inboxes with disposable_email, then opt into RFC, DNS, spoof, or filter checks when needed.

RUNTIME

Runtime checks

Check email addresses anywhere in your app using the rule class or facade.

SYNC

Remote syncing

Keep your domain list fresh by syncing from a remote source whenever you need to.

CACHE

Optional caching

Speed up repeated lookups in busy applications with built-in cache support.

LIVE INTERACTIVE TESTER

Try the Disposable Email Checker

Enter an email address to preview disposable-domain detection and see the Laravel validation example.

READY
@
Quick test presets:
Inspection Pipeline Status110,646+ Domains Loaded
•RFC 5322 Syntax
•124k+ Threat Blacklist
•MX DNS Route
•Offline Cache (<0.02ms)
LiveValidatorInspector.php< 0.02ms (Local Cache)
1$request->validate([
2  'email' => ['required', 'email', 'disposable_email'],
3]);
Checking email policy...
0.00ms

Initializing disposable threat database...

CHECKED:name@example.com
DOMAIN:pending...
RESULT:IDLE

Add RFC and DNS Email Validation

Combine disposable-domain blocking with optional email syntax and DNS MX checks.

'disposable_email:rfc''disposable_email:dns''disposable_email:rfc,dns'
RFCRFC and strict modes

Validate supported email RFCs and optionally reject RFC warnings.

DNSMailbox domain checks

Opt into DNS lookups and require the email domain to have a valid MX record.

SPOOFUnicode spoof protection

Reject deceptive Unicode addresses using the optional spoof validator.

FILTERPHP filter modes

Choose standard or Unicode-aware filter_var validation.

PRACTICAL USAGE

Stop Fake Accounts & Trial Abuse Across Every Entry Point

Deploy zero-latency email validation across user registrations, SaaS trials, lead capture, and API endpoints.

BUILT-IN ARSENAL

What the Package Includes

6 Features
Massive Threat Database124k+ Domains

Large built-in disposable domain list ready to use out of the box with zero network latency.

Flexible Validation RulesString & Object

Seamless support for both classic 'disposable_email' string rules and dedicated rule objects.

Advanced Protocol ModesRFC & DNS MX

Optional RFC 5322 strict formatting, active DNS MX lookups, spoof prevention, and PHP filter modes.

Facade & Runtime ChecksZero Overhead

Instant Disposable::email(...) verification for service classes, controllers, and custom business logic.

Native Blade DirectivesUI Helpers

Drop @disposableEmail(...) directly into Blade views for clean conditional rendering and user warnings.

Auto-Sync & Local CacheProduction Ready

Remote syncing via Artisan commands, custom blacklist files, and memory caching for high-volume pipelines.

STRATEGIC IMPACT

Common Use Cases

5 Scenarios
01
Registration & Account CreationAuth Flows

Block burner addresses instantly during signup to prevent database pollution, dead email accounts, and bot spam.

02
Free Trial & Promo ProtectionRevenue Shield

Prevent users from endlessly creating new accounts to reuse free trial periods, starter credits, or welcome coupons.

03
B2B Onboarding & Corporate LeadsLead Quality

Ensure that whitepapers, webinars, demo bookings, and sales inquiries capture genuine business and corporate domains.

04
Admin Tools & Security ModerationSecOps

Audit user databases, screen incoming contact form leads, and flag high-risk disposable accounts inside admin dashboards.

05
Invite Loops & Referral SystemsAnti-Fraud

Eliminate referral fraud and fake invite exploits where bad actors trigger referral rewards with burner emails.

SPONSORS

Block fake sign-ups. Then ship your SaaS faster.

Laravel Disposable Email keeps burner addresses out of your registration forms. SaaS Laravel gives you everything around them — tenancy, passkeys, roles and translations — so you can launch on day one.

Featured sponsor

Building a SaaS? Start with SaaS Laravel.

Production-ready, multi-tenant starter kits for Laravel 13 and Inertia 3, in Vue, React or Svelte. Tenancy, sign-in with passkeys and two-factor, roles, translations and an admin dashboard come ready, so you start on your own product on day one.

  • Multi-tenancy, a database per tenant
  • Passkeys and two-factor sign-in
  • Roles and permissions
  • 17 languages
  • Per-domain branding
  • Admin dashboard
FREQUENTLY ASKED QUESTIONS

Laravel Disposable Email: Frequently Asked Questions

Authoritative answers to common questions about blocking temporary fake inboxes, sub-millisecond offline validation, RFC/DNS MX modes, Blade directives, and abuse prevention.

Validation RuleHow do I validate and block disposable emails in Laravel forms and requests?

Add the 'disposable_email' rule to any Form Request or controller validator array alongside standard rules like 'required' and 'email'. When a user submits an address belonging to a known temporary or disposable domain, Laravel automatically halts the validation pipeline and returns a standard 422 Unprocessable Entity response with your custom error message.

Offline Speed (<0.4ms)Does this Laravel disposable email validator work 100% offline without third-party API keys?

Yes, completely offline. The package includes a pre-downloaded local threat database of over 124,220+ known disposable domains stored directly on your server. Lookups execute in sub-millisecond time (under 0.4ms) using memory-efficient hash maps without relying on external SaaS APIs, API quotas, recurring monthly charges, or network latency.

RFC & DNS MXHow can I enable strict RFC 5322 syntax and live MX record DNS verification?

You can append parameters directly to the rule: 'disposable_email:rfc,dns,spoof'. The :dns mode performs real-time DNS queries to verify that the domain has active Mail Exchange (MX) records ready to receive messages, while :rfc enforces strict RFC 5322 formatting compliance and :spoof detects deceptive Unicode homoglyph attacks.

Runtime FacadeHow do I check disposable emails in services, background jobs, or controllers via Facade?

Use the Disposable facade anywhere in your PHP logic by calling Disposable::email($email). It returns a fast boolean (true if disposable, false if legitimate). This makes it straightforward to reject burner addresses inside webhook consumers, background queues, API gateways, or batch data import scripts without writing a form request.

Blade DirectivesHow do I use disposable email validation in Laravel Blade views?

The package registers a native @disposableEmail($email) directive with matching @else and @enddisposableEmail tags. You can use it directly in Blade templates to conditionally display warning banners, highlight accounts requiring email updates, or disable sensitive payout buttons without any custom controller boilerplate.

Sync & AutomationHow do I keep the disposable email domains blocklist updated automatically?

Run the Artisan command php artisan erag:sync-disposable-email-list to pull the latest verified threat list from upstream sources. To automate this in production, schedule the command weekly in your Laravel scheduler (routes/console.php or Kernel.php) using Schedule::command('erag:sync-disposable-email-list')->weekly(). Updates are written atomically to ensure zero downtime.

ConfigurationCan I whitelist custom test domains or configure a private blacklist file?

Yes. Publish the package configuration file to config/disposable-email.php. You can define a whitelist array containing company domains or internal QA testing addresses that must always pass. You can also define a blacklist_file path to append your own internal company blocklist to the global database. Whitelisted domains bypass checks instantly with zero false positives.

Performance & ScaleHow do I cache disposable email domain checks in Redis for maximum throughput?

Enable caching in config/disposable-email.php by setting cache.enabled to true and choosing your desired store (such as Redis or Memcached). In-memory caching eliminates disk file reads and accelerates lookup performance down to approximately 0.15ms, allowing high-traffic apps to handle tens of thousands of concurrent signups seamlessly.

CompatibilityWhich PHP and Laravel versions are supported?

The package supports PHP 8.1, 8.2, 8.3, and 8.4+ alongside Laravel 10.x, 11.x, and upcoming 12.x. It strictly adheres to PSR-12 coding standards, supports strict types, and has zero conflicting third-party dependencies, guaranteeing seamless compatibility with your existing Laravel application stack.

Abuse PreventionHow does this package stop free trial abuse and fake bot signups in SaaS apps?

Automated bots and serial trial abusers rely on temporary inboxes (like Mailinator or Guerrilla Mail) to spin up endless accounts and claim starter credits or one-time coupons. Enforcing disposable email checks at registration blocks over 95% of automated abuse at the door, protects your SMTP sender reputation against high bounce rates, and prevents ghost accounts from bloating your database.

Install and Configure Laravel Disposable Email

Follow the documentation to install the package, configure validation, sync your domain list, and enable caching.

MIT License. Copyright Er Amit Gupta