brainfab/email-verification

1.0.0 2018-02-22 16:02 UTC

This package is not auto-updated.

Last update: 2024-11-24 06:11:18 UTC


README

Installation

Require this package with composer:

composer require brainfab/email-verification

Usage example:

<?php

require_once 'vendor/autoload.php';

use Brainfab\EmailVerify\EmailVerify;
use Brainfab\EmailVerify\Provider\WhoisxmlapiProvider;

$apiKey = '';//your whoisxmlapi.com API key
$email = 'support@whoisxmlapi.com';//The email address to be verified.

$provider = new WhoisxmlapiProvider($apiKey);//create provider instance
$emailVerify = new EmailVerify($provider);

$result = $emailVerify->verify($email);

var_dump(
    $result->getEmail(),
    $result->getFormatCheck(),
    $result->getSmtpCheck(),
    $result->getDnsCheck(),
    $result->getFreeCheck(),
    $result->getDisposableCheck(),
    $result->getCatchAllCheck(),
    $result->getMxRecords()
);

List of available providers:

  • whoisxmlapi.com - Brainfab\EmailVerify\Provider\WhoisxmlapiProvider
  • hunter.io - Brainfab\EmailVerify\Provider\HunterProvider