This package supports:
- Validate with SMTP
- Support for Disposable Email
Notice - That extracts the MX records from the email address and connect with the mail server to make sure the mail address accurately exist. So it may be slow loading time in local and some co-operate MX records take a long time .
composer require tintnaingwin/email-checker
For laravel >=5.5 that's all. This package supports Laravel new Package Discovery.
If you are using Laravel < 5.5, you also need to add the service provider class to your project's config/app.php
file:
Tintnaingwin\EmailChecker\EmailCheckerServiceProvider::class,
'EmailChecker' => Tintnaingwin\EmailChecker\Facades\EmailChecker::class,
To add 'email_checker' at email rule
// [your site path]/app/Http/Requests/RegisterRequest.php
public function rules()
{
return [
'name' => 'required|max:255',
'email' => 'bail|required|email|max:255|unique:users|email_checker',
'password' => 'bail|required|min:6|confirmed',
];
}
// reture boolean
EmailChecker::check('[email protected]');
You can run the tests with:
vendor/bin/phpunit
- Disposable Email List
The MIT License (MIT). Please see License File for more information.