PHP code example of ylly / mailboxlayer

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

    

ylly / mailboxlayer example snippets


$emailChecker = EmailCheckerFactory::create($accessKey, $proxy);

$emailChecker = EmailCheckerFactory::createFromYamlFile('/path/to/config.yml');

$emailChecker = EmailCheckerFactory::createFromArray($configArray);

$check = $emailChecker->checkEmail($email);

$check = $emailChecker->checkEmail($email, $catchAll);

class Listener implement LogListenerInterface
{
    public function recieve($level, $message)
    {
        // do something
    }
}

$emailChecker->addListener(new Listener());