PHP Classes

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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 644 All time: 4,961 This week: 146Up
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: 39
All time rank: 262375 in Russian Federation Russian Federation
Week rank: 295 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  
File Role Description
Accessible without login Plain text file readme.md Doc. Documentation
Plain text file EmailValidator.php Class EmailValidator class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:644
This week:0
All time:4,961
This week:146Up