Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

Laravel-Disposable-Email

> 后端框架
Open source

Disposable email address validator for Laravel

606 stars0 likes1 views
WebsiteGitHub

About

Disposable email address validator for Laravel

Laravel Disposable Email

Adds a validator to Laravel for checking whether a given email address isn't originating from disposable email services such as Mailinator, Guerillamail, ... Uses the disposable domains blacklist from disposable/disposable by default.

Installation

  1. Run the Composer require command to install the package. The service provider is discovered automatically.

    bash
    composer require propaganistas/laravel-disposable-email
  2. Publish the configuration file and adapt the configuration as desired:

    bash
    php artisan vendor:publish --tag=laravel-disposable-email
  3. (optional) In your languages directory, add for each language an extra language line for the validator:

    php
    'indisposable' => 'Disposable email addresses are not allowed.',
  4. (optional) This package receives a weekly patch release containing updates to the built-in disposable domains list. If you are not able to bump your installed version accordingly, or just want to stay ahead of things, make sure to update the domains list yourself at any interval you like by running or scheduling the disposable:update command:

    php
    // routes/console.php
    
    use Illuminate\Support\Facades\Schedule;
    
    Schedule::command('disposable:update')->daily();

Usage

Use the indisposable validator to ensure a given field doesn't hold a disposable email address. You'll probably want to add it after the email validator to make sure a valid email is passed through:

php
'field' => ['email','indisposable'],

MX record inspection

Disposable services rotate their public "front" domains endlessly (e.g. web-library.net) while their backend mail infrastructure stays constant (e.g. mail.tm). Because a freshly rotated front domain won't be on the list yet, it can slip through a plain domain-list check.

Enabling MX inspection closes that gap: the validator resolves the domain's MX records and flags the address when its mail servers point at a domain that's already on the list.

Simply opt in by specifying the mx parameter:

php
'field' => ['email','indisposable:mx'],

Note: this performs a live DNS lookup during validation, trading a little latency for broader coverage. Leave off the mx parameter if your validation path must stay strictly offline.

Custom fetches

By default the package retrieves a new list by using file_get_contents(). If your application has different needs (e.g. when behind a proxy) please review the disposable-email.fetcher configuration value.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPdisposable-domainsdisposable-emaillaravelmail

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架