PHP code example of masroore / mailcheck-php

1. Go to this page and download the library: Download masroore/mailcheck-php 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/ */

    

masroore / mailcheck-php example snippets


> $mailcheck = new Kaiju\Mailcheck\Mailcheck();
> print_r($mailcheck->suggest("[email protected]"));

# Kaiju\Mailcheck\EmailSuggestion Object
# (
#     [fullAddress] => [email protected]
#     [originalAddress] => [email protected]
#     [account] => user
#     [domain] => gmail.com
# )

> $mailcheck->suggest("[email protected]")
# => null

$mailcheck->setDomains(['customdomain.com', 'anotherdomain.net']); // replaces existing domains
$mailcheck->setSecondLevelDomains(['domain', 'yetanotherdomain']); // replaces existing SLDs
$mailcheck->setTopLevelDomains(['com.au', 'ru']);  // replaces existing TLDs