shyim / check-if-email-exists
A PHP library to check if an email address exists and is deliverable
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 1
Open Issues: 1
pkg:composer/shyim/check-if-email-exists
Requires
- php: >=8.2
- ext-openssl: *
- fgribreau/mailchecker: ^6.0
Requires (Dev)
- phpunit/phpunit: ^11.0
README
This is a PHP library to check if an email address exists and is deliverable.
Installation
composer require shyim/check-if-email-exists
Usage
CLI
# After cloning the repo ./bin/check-email test@example.com # After composer install (global or local) vendor/bin/check-email test@example.com
Programmatic API
use Shyim\CheckIfEmailExists\EmailChecker; require 'vendor/autoload.php'; $checker = new EmailChecker(); $result = $checker->check('test@example.com'); print_r($result->toArray());
Features
- Syntax validation
- DNS MX record check
- SMTP connection verification (HELO, MAIL FROM, RCPT TO)
- Catch-all detection
- Role account detection
- Disposable email detection
License
MIT