PHP Classes


Recommend this page to a friend!
  Classes of Lars Moelleken  >  PHP EMail Check  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP EMail Check
Validate email addresses using DNS or find typos
Author: By
Last change: Update
Date: 1 month ago
Size: 2,444 bytes


Class file image Download

Build Status Scrutinizer Code Quality Codacy Badge SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version PHP 7 ready License

E-Mail Address Validator for PHP


The best way to validate an e-mail address is still to send a duplicate opt-in-mail, when the user clicks on the link, it was a valid e-mail address!


The recommended installation way is through Composer.

$ composer require voku/email-check


Example 1:

$emailCheck = EmailCheck::isValid("");

// true

Example 2: (check for example-domain)

$emailCheck = EmailCheck::isValid("", true);

// false

Example 3: (check for typo in domain)

$emailCheck = EmailCheck::isValid("", false, true);

// false

Example 4: (check for temporary-domain)

$emailCheck = EmailCheck::isValid("", false, false, true);

// false

Unit Test:

1) Composer is a prerequisite for running the tests.

composer install

2) The tests can be executed by running this command from the root directory: