2017 © Pedro Peláez
 

library emailvalidator

Validate Email Address and use SMTP Lookup to verify MX Record lookups

image

rottingham/emailvalidator

Validate Email Address and use SMTP Lookup to verify MX Record lookups

  • Friday, November 8, 2013
  • by rottingham
  • Repository
  • 1 Watchers
  • 4 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Email Validator

Utility Class to validate Email address string as well as determine if the Email inbox exists on the mail server by using an SMTP lookup., (*1)

For extended usage examples, see test files., (*2)

Composer Ready, (*3)

Available on Packagist: https://packagist.org/packages/rottingham/emailvalidator, (*4)

Sample Usage

Simply import the Emailvalidator.class.php file into your project if you are not using dependency injection., (*5)

require __DIR__ . '/src/com/rottingham/EmailValidator/EmailValidator.class.php';
Valiate Email

To validate an Email string, use the EmailValidator::validate(email) method;, (*6)

$email = 'imlegit@google.com';
$isValid = EmailValidator\EmailValidator::validate($email);
var_dump($isValid);

Check if Email Exists

To determine if the Emai actaully exists on the mail server, use the EmailValidator::exists(email) method;, (*7)

$email = 'imlegit@yahoo.com';
$exists = EmailValidator\EmailValidator::exists($email);
var_dump($exists);

Note: EmailValidator::exists(url) calls EmailValidator\SmtpLookup\SmtpLookup::lookup(email) and requests from the mail server whether or not the address book record exists. This could fail if your IP address and/or mail server have been blacklisted., (*8)

Email Lookup

You can use the EmailValidator\SmtpLookup.class.php class seperately by importing it into your project., (*9)

require __DIR__ . '/src/com/rottingham/SmtpLookup/SmtpLookup.class.php';

The Versions

08/11 2013

dev-master

9999999-dev https://github.com/rottingham/EmailValidator

Validate Email Address and use SMTP Lookup to verify MX Record lookups

  Sources   Download

MIT

The Requires

  • php >=5.0

 

email url validate format smtp mxrecord