PHP code example of ddtraceweb / smtp-validator-email
1. Go to this page and download the library: Download ddtraceweb/smtp-validator-email 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/ */
ddtraceweb / smtp-validator-email example snippets
use SmtpValidatorEmail\ValidatorEmail;
$from = '[email protected]'; // for SMTP FROM:<> command
$emails = '[email protected]';
$validator = new ValidatorEmail($email, $from);
var_dump($validator->getResults());
use SmtpValidatorEmail\ValidatorEmail;
$from = '[email protected]'; // for SMTP FROM:<> command
$emails = array('[email protected]', '[email protected]');
$validator = new ValidatorEmail($email, $from);
var_dump($validator->getResults());
use SmtpValidatorEmail\ValidatorEmail;
$from = '[email protected]'; // for SMTP FROM:<> command
$emails = array('[email protected]', '[email protected]');
//two loops in this example for difficult domains.
$options = array('delaySleep' => array(0, 6));
//Handle $options to the constructor as third parameter
$validator = new ValidatorEmail($email, $from, $options);
var_dump($validator->getResults());
use SmtpValidatorEmail\ValidatorEmail;
$from = '[email protected]'; // for SMTP FROM:<> command
$emails = array('[email protected]', '[email protected]');
//more informations option activate
$options = array('domainMoreInfo' => true);
//Handle $options to the constructor as third parameter
$validator = new ValidatorEmail($email, $from, $options);
var_dump($validator->getResults());
use SmtpValidatorEmail\ValidatorEmail;
$from = '[email protected]'; // for SMTP FROM:<> command
$emails = array('[email protected]', '[email protected]');
//more informations option activate
$options = array('domainMoreInfo' => true);
//Handle $options to the constructor as third parameter
$validator = new ValidatorEmail($email, $from, $options);
var_dump($validator->getResults());