PHP Classes

PHP Email Validator: Check if a email address is valid with the SMTP MX

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 645 All time: 4,960 This week: 40Up
Version License PHP version Categories
php-email-validator 1.0.0BSD License5.0Email, Networking, PHP 5, Validation
Description 

Author

This class can check if a email address is valid with the SMTP MX server.

It takes a given email address and queries the DNS server for the list of MX server addresses.

The class can connect to the first MX SMTP server or to the domain address in case the MX record does not exist).

It sends SMTP commands to emulate an attempt to deliver a message from a given email address to the address to be tested.

The class determines that the address may be valid if the sent commands are accepted by the SMTP server.

Picture of Dmitry M. Merkushin
  Performance   Level  
Name: Dmitry M. Merkushin is available for providing paid consulting. Contact Dmitry M. Merkushin .
Classes: 2 packages by
Country: Russian Federation Russian Federation
Age: 40
All time rank: 262175 in Russian Federation Russian Federation
Week rank: 288 Up16 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 1x

Documentation

Email validator

Purpose

Check:

  • is email valid (via simple regexp)
  • does email exist

Usage

$validator = new EmailValidator('test121212321312@gmail.com', 'mydomain.com', 'noreply@mydomain.com');

if ($validator->validate()) {

    echo 'valid email';

} else {

    echo 'invalid email';

}

Important

Only for non-IDN emails


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file readme.md Doc. Documentation
Plain text file EmailValidator.php Class EmailValidator class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:645
This week:0
All time:4,960
This week:40Up