Skip to content

A fast and efficient company/work email validator that checks if an email domain belongs to a free email provider.

License

Notifications You must be signed in to change notification settings

devMuhammad05/company-email-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Company Email Validator

A fast and efficient company/work email validator that checks if an email domain belongs to a free email provider.

Packagist Version Total Downloads License


Installation

Install via Composer:

composer require devmuhammad/company-email-validator

Usage

Validate a single email

    use Muhammad\CompanyEmailValidator\EmailValidator;

    $validator = new EmailValidator();
    $validator->isCompanyEmail("[email protected]");  //true
    $validator->isCompanyEmail("[email protected]");  //false

Validate multiple emails

    use Muhammad\CompanyEmailValidator\EmailValidator;

    $validator = new EmailValidator();
    $validator->areCompanyEmails(["[email protected]", "[email protected]"]);  
 
    Output(array):
        [
            "[email protected]" => true,
            "[email protected]" => false
        ]

Validate emails against a custom free domain list

    use Muhammad\CompanyEmailValidator\EmailValidator;

    $email = "[email protected]";
    $validator = new EmailValidator(['customfree.com']); 
    $validator->isCompanyEmail($email);  //false

Contribution

Contributions are welcome! Feel free to submit an issue or a pull request.

Check the LICENSE file for more info.

About

A fast and efficient company/work email validator that checks if an email domain belongs to a free email provider.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages