Appearance
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 Block temporary inboxes with disposable_email, then opt into RFC, DNS, spoof, or filter checks when needed.
Check email addresses anywhere in your app using the rule class or facade.
Keep your domain list fresh by syncing from a remote source whenever you need to.
Speed up repeated lookups in busy applications with built-in cache support.
Enter an email address to preview disposable-domain detection and see the Laravel validation example.
Initializing disposable threat database...
Combine disposable-domain blocking with optional email syntax and DNS MX checks.
'disposable_email:rfc''disposable_email:dns''disposable_email:rfc,dns'
Validate supported email RFCs and optionally reject RFC warnings.
Opt into DNS lookups and require the email domain to have a valid MX record.
Reject deceptive Unicode addresses using the optional spoof validator.
Choose standard or Unicode-aware filter_var validation.
Deploy zero-latency email validation across user registrations, SaaS trials, lead capture, and API endpoints.
Large built-in disposable domain list ready to use out of the box with zero network latency.
Seamless support for both classic 'disposable_email' string rules and dedicated rule objects.
Optional RFC 5322 strict formatting, active DNS MX lookups, spoof prevention, and PHP filter modes.
Instant Disposable::email(...) verification for service classes, controllers, and custom business logic.
Drop @disposableEmail(...) directly into Blade views for clean conditional rendering and user warnings.
Remote syncing via Artisan commands, custom blacklist files, and memory caching for high-volume pipelines.
Block burner addresses instantly during signup to prevent database pollution, dead email accounts, and bot spam.
Prevent users from endlessly creating new accounts to reuse free trial periods, starter credits, or welcome coupons.
Ensure that whitepapers, webinars, demo bookings, and sales inquiries capture genuine business and corporate domains.
Audit user databases, screen incoming contact form leads, and flag high-risk disposable accounts inside admin dashboards.
Eliminate referral fraud and fake invite exploits where bad actors trigger referral rewards with burner emails.
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.
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.
Authoritative answers to common questions about blocking temporary fake inboxes, sub-millisecond offline validation, RFC/DNS MX modes, Blade directives, and abuse prevention.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Follow the documentation to install the package, configure validation, sync your domain list, and enable caching.