Laravel Disposable Email

A Laravel validation rule that blocks disposable and throwaway email addresses like Mailinator and Guerrillamail.

Library
Composer
v2.5.1
607stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
70/100Good
Development Activity64
Maintenance60
Community68
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture78
Code Quality80
Innovation68
Learning Curve90

propaganistas/laravel-disposable-email adds an indisposable validation rule to Laravel that rejects email addresses originating from disposable or throwaway email services such as Mailinator and Guerrillamail. It uses the community-maintained disposable/disposable domain blacklist by default.

Beyond a plain domain-list check, it can optionally inspect a domain’s MX records to catch freshly rotated front domains that point at known disposable mail infrastructure. A bundled Artisan command keeps the blacklist current, and the package integrates cleanly with Laravel’s validator and caching.

What You Get

  • An indisposable validation rule for rejecting throwaway email addresses
  • A bundled, weekly-updated blacklist from disposable/disposable
  • Optional MX-record inspection to catch newly rotated disposable domains
  • A disposable:update Artisan command to refresh the domain list
  • A DisposableDomains facade and configurable caching for custom checks

Common Use Cases

  • Blocking disposable email addresses during user registration
  • Enforcing real email addresses on newsletter or lead-capture forms
  • Reducing spam and fake signups in Laravel applications
  • Programmatically checking whether a domain is disposable via the facade

Under The Hood

Architecture - A DisposableEmailServiceProvider registers a DisposableDomains service (exposed via a facade) and the indisposable validator extension. DisposableDomains loads domains from a bundled domains.json, caching them through illuminate/cache, and offers an MX-inspection path that resolves DNS records. A Fetcher (DefaultFetcher) plus an UpdateDisposableDomainsCommand refresh the list from the upstream source.

Tech Stack - PHP ^8.1 with ext-json, built on Illuminate components (cache, config, contracts, support, console, validation) spanning Laravel 10 through 13. Dev tooling uses PHPUnit, Orchestra Testbench, Mockery, and Laravel Pint.

Code Quality - The code is cleanly separated into service provider, domain service, fetcher, console command, and validation extension, with a tests directory run under PHPUnit and Testbench. Active development and consistent releases (including weekly blacklist updates) reflect solid maintenance.

API Design - Usage is idiomatic Laravel: add ‘indisposable’ (optionally ‘indisposable:mx’) to a field’s validation rules and it just works, with auto-discovered service provider and a facade for programmatic checks. The optional MX flag keeps the common offline path fast while offering deeper coverage when needed.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search