Email Validator alternatives and similar libraries
Based on the "Email" category.
Alternatively, view Email Validator alternatives based on common mentions on social networks and blogs.
-
CssToInlineStyles
CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails. -
phpList
This module is the core of phpList 4. Join discussion at the community forum: https://discuss.phplist.org/ -
Bounce Mail Handler
Bounce Mail Handler for PHP | This is a "reboot" of PHPMailer-BMH from WorxWare.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Email Validator or a related project?
README
Email Validator
Small PHP library to valid email addresses using a number of methods.
Features
- Validates email address
- Checks for example domains (e.g. example.com)
- Checks for disposable email domains (e.g. mailinator.com)
- Checks for role-based addresses (e.g. abuse@)
- Checks for MX records (i.e. can receive email)
Install (using Composer)
composer require nojacko/email-validator:~1.0
Usage
Generalised Functions
isValid($email)
Runs all the tests within this library. Returns true or false.isSendable($email)
Checks isEmail, isExample and hasMx. Returns true or false.
Specific Functions
If you want more control, use these functions seperately.
isEmail($email)
Note: returns true or false only.isExample($email)
isDisposable($email)
isRole($email)
hasMx($email)
These functions take a single argument (an email address) and return:
- true, when function name is satisfied.
- false, when function name is not satisfied.
- null, when check is not possible, i.e. an invalid email is given.
Examples
$validator = new \EmailValidator\Validator();
$validator->isValid('[email protected]'); // true
$validator->isValid('[email protected]'); // false
$validator->isValid('[email protected]'); // false
$validator->isSendable('[email protected]'); // true
$validator->isSendable('[email protected]'); // true
$validator->isSendable('[email protected]'); // false
$validator->isEmail('[email protected]'); // true
$validator->isEmail('example@example'); // false
$validator->isExample('[email protected]'); // true
$validator->isExample('[email protected]'); // false
$validator->isExample('example.com'); // null
$validator->isDisposable('[email protected]'); // false
$validator->isDisposable('[email protected]'); // true
$validator->isDisposable('example.com'); // null
$validator->isRole('[email protected]'); // false
$validator->isRole('[email protected]'); // true
$validator->isRole('example.com'); // null
$validator->hasMx('[email protected]'); // false
$validator->hasMx('[email protected]'); // true
$validator->hasMx('example.com'); // null
Contribute
Contributions welcome!
Requirements
- Test-driven development
- Follow PSR-2 Coding Style Guide
- One change per pull request
Add/Remove Disposable Domain
See the email-data-disposable project.
New Feature
If you're planning a new feature, please raise an issue first to ensure it's in scope. The aim is to keep this library small and with one specific purpose.
Other Contributions
For anything that isn't a new feature (bug fix, tests, etc) just create a pull request.
Testing
Test are all located in tests
folder.
Run tests with phpunit. In root folder, execute phpunit
in a CLI.
Versioning
License
The MIT License (MIT). See LICENCE file.
*Note that all licence references and agreements mentioned in the Email Validator README section above
are relevant to that project's source code only.