百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

Laravel-Disposable-Email

> 后端框架
开源

Laravel 可用的邮箱地址验证器

606 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPdisposable-domainsdisposable-emaillaravelmail

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

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