1. Go to this page and download the library: Download g4t/email-rule library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
g4t / email-rule example snippets
use G4T\EmailRule\Rules\VerifiableEmail;
$request->validate([
'email' => ['
use G4T\EmailRule\Rules\VerifiableEmail;
// Syntax + DNS + MX. Fast, no SMTP.
'email' => ['able()],
// Block shared mailboxes too
'email' => ['on
'email' => ['
'email' => ''
use G4T\EmailRule\EmailVerifier;
$verification = app(EmailVerifier::class)->verify('[email protected]');
$verification->isClean(); // bool
$verification->findings(); // [Finding::Disposable, ...]
$verification->toArray(); // full detail, ready to log or store
'disposable' => [
// Replace the bundled list with your own newline-delimited file
'list_path' => storage_path('app/disposable-domains.txt'),
// Or extend it
'extra' => ['annoying-provider.com'],
// Allow always wins, for providers your customers legitimately use
'allow' => ['fastmail.com'],
],