EragLaravelDisposableEmail helps you detect and block temporary email addresses during form validation, runtime checks, and Blade conditionals. It comes with 110,646+ known disposable domains, simple installation, remote sync support, custom blacklist support, and optional caching for faster lookups.
Whether you are protecting registrations, trial signups, invite systems, or internal tools, this package gives you a simple Laravel-friendly API for rejecting disposable email domains before they become a data quality problem.
composer require erag/laravel-disposable-emailphp artisan erag:install-disposable-email$request->validate([ 'email' => ['required', 'email', 'disposable_email'],]);if (DisposableEmail::isDisposable($email)) { // stop temp inboxes early}
Add disposable_email to your validation rules and block temporary inboxes at the form level.
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.
Preview how the validation experience feels inside a Laravel app. Red highlights invalid or disposable addresses, while green shows an email that passes the check.
Applying the disposable email validation rule before the form can continue.
$request->validate([
'email' => ['required', 'email', 'disposable_email'],
]);
Email checked: name@example.com
Domain: pending...
Status: Checking email policyThe docs cover the full package workflow, from installation and validation rules to runtime checks, Blade directives, syncing, custom blacklists, and caching.
@disposableEmail(...) for simple conditional output in Blade views.Start with validation at the request layer, then add runtime checks anywhere your business logic needs a simple yes or no answer.
public function rules(): array{ return [ 'email' => ['required', 'email', 'disposable_email'], ];}
use DisposableEmail;if (DisposableEmail::isDisposable($email)) { throw ValidationException::withMessages([ 'email' => 'Use a permanent inbox.' ]);}
@disposableEmail($email) <p class="text-red-600">Disposable email detected</p>@else <p class="text-green-600">Email looks good</p>@enddisposableEmail
Start with Getting Started, then move through validation, configuration, syncing, and caching to set up a complete disposable email blocking workflow.