PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2014-12-25 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 627 All time: 4,908 This week: 458Up
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.

  Performance   Level  
Name: Dmitry M. Merkushin <contact>
Classes: 2 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 1x

Details

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:627
This week:0
All time:4,908
This week:458Up