This is a simple laravel package that utilizes the Email Verifier api to verify that a mailbox actually exists.
Email Checker .net requires credit for you to utilise the API.
- Head to their website and purchase credits.
- Sign up on RAPID Api to get an X-RapidAPI-Key
- Mailbox Verifier
- Artisan command line verification
- Email Syntax Verifier
- Invalid emails log in table
-
Install the package via composer
composer require maggz69/emailchecker
-
If you are using Laravel version < 5.5 or you have disabled package auto discovery, then register the package Service provider through adding the following in
config>app.php
EmailChecker\EmailCheckerServiceProvier::class,
-
Publish the email checker config file
php artisan vendor:publish --provider="EmailChecker\EmailCheckerServiceProvider"
-
Add your
RAPID_API_KEY
in the env file, or the config fileconfig>emailchecker.php
(not advisable especially if you're using Version Control Systems / in production)
To use the email checker,
$checker = new EmailChecker\Checker;
$result = $checker->check('[email protected]');
if($result){
//Email is valid Yaay
}else{
//Email is not valid dang
dd($checker->getLastResponse());
}