PHP code example of aziraphale / email-address-validator

1. Go to this page and download the library: Download aziraphale/email-address-validator 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/ */

    

aziraphale / email-address-validator example snippets


$validator = new EmailAddressValidator;
if ($validator->check_email_address('[email protected]')) {
    // Email address is technically valid
}

if (EmailAddressValidator::checkEmailAddress("[email protected]")) {
    // Email address is technically valid
}

if (EmailAddressValidator::checkLocalPortion("test")) {
    // "test" is technically a valid string to have before the "@" in an email address
}
if (EmailAddressValidator::checkDomainPortion("example.org")) {
    // "example.org" is technically a valid email address host
}

php composer.phar 

php composer.phar