| Recommend this page to a friend! |
| Info | Example | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2026-02-05 (1 month ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked | |||||
| Version | License | PHP version | Categories | |||
| laravel-active-email 1.0 | MIT/X Consortium ... | 8 | Email, Libraries, Validation, PHP 8 |
Please read this document to learn how to configure a Laravel application to validate forms with email fields and reject disposable email addresses.
<?php |
<p align="center"> <a href="https://packagist.org/packages/veeqtoh/laravel-active-email"><img src="https://img.shields.io/packagist/v/veeqtoh/laravel-active-email?style=flat-square" alt="Latest Version on Packagist"></a> <a href="https://packagist.org/packages/veeqtoh/laravel-active-email"><img src="https://img.shields.io/packagist/dt/veeqtoh/laravel-active-email?style=flat-square" alt="Total Downloads"></a> <a href="https://packagist.org/packages/veeqtoh/laravel-active-email"><img src="https://img.shields.io/packagist/php-v/veeqtoh/laravel-active-email?style=flat-square" alt="PHP from Packagist"></a> <a href="https://github.com/veeqtoh/laravel-active-email/blob/master/LICENSE"><img src="https://img.shields.io/github/license/veeqtoh/laravel-active-email?style=flat-square" alt="GitHub license"></a> </p>
This package provides a library of disposable domains and adds a validator to Laravel apps to check that a given email address isn't coming from a disposable email service such as Mailinator, Guerillamail, Tempmail considering all their possible wildcards.
The package has been developed and tested to work with the following minimum requirements:
You can install the package via Composer. The service provider is discovered automatically.
composer require veeqtoh/laravel-active-email
You can then publish the package's config file and update it as you'd prefer:
php artisan vendor:publish --provider="Veeqtoh\ActiveEmail\Providers\ActiveEmailProvider"
Add the notblacklisted validator to your email validation rules array (or string) to ensure that the domain for a given email address is not blacklisted. I'd recommend you add it after the email validator to make sure a valid email is passed through:
'emailField' => 'email|notblacklisted',
or
'emailField' => ['email', 'notblacklisted'],
Instantiate the NotBlackListedEmail Class as part of your email validation rules array to ensure that the domain for a given email address is not blacklisted. Again, I'd recommend you add it after the email validator to make sure a valid email is passed through:
use Veeqtoh\ActiveEmail\Rules\NotBlackListedEmail;
'emailField' => ['email', new NotBlackListedEmail()],
The package is highly customizable from the config file with the following features:
This value determines the strictness level of this feature. when set to true, domains in the grey list are also blacklisted.
It is turned on by default, but can be set in your .env file as follows:
DISPOSABLE_EMAIL_STRICT_MODE=true,
This is a list of base domains with or without the TLD that are blacklisted by default. Add a domain to this list to blacklist it.
This is a list of base domains with or without the TLD that aren't blacklisted by default except when in strict mode. Add a domain to this list to whitelist it when the feature is not set to strict mode. Ensure that the domain is not on the black list.
This is a list of base domains with or without the TLD that are blacklisted by default but you want them to be bye passed.
You may define your preferred error message or leave as is to use the package's.
There's always something that can be done to improve this package. I'd keep updating this list as I think of them.
To run the package's unit tests, run the following command:
vendor/bin/pest
If you find any security related issues, please contact me directly at victorjohnukam@gmail.com to report it.
If you wish to make any changes or improvements to the package, feel free to make a pull request.
Note: A contribution guide will be added soon.
Check the CHANGELOG to get more information about the latest changes.
Check the UPGRADE guide to get more information on how to update this library to newer versions.
The MIT License (MIT). Please see License File for more information.
If you've found this package useful, please consider sponsoring this project. It will encourage me to keep maintaining it.
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Doc. | Documentation | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| / | .github |
| File | Role | Description | ||
|---|---|---|---|---|
| |
Data | Auxiliary data | ||
| |
Data | Auxiliary data | ||
| |
Data | Auxiliary data | ||
| / | .github | / | workflows |
| File | Role | Description |
|---|---|---|
| |
Data | Auxiliary data |
| |
Data | Auxiliary data |
| / | src |
| File | Role | Description | ||
|---|---|---|---|---|
| |
Class | Class source | ||
| / | tests |
| File | Role | Description | ||
|---|---|---|---|---|
| |
Class | Class source | ||
| |
Class | Class source | ||
| / | tests | / | Architecture |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Example | Example script |
| |
Class | Class source |
| / | tests | / | Unit |
| File | Role | Description |
|---|---|---|
| |
Example | Example script |
| |
Class | Class source |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | |||||||
| 100% |
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.