PHPackages                             rottingham/emailvalidator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. rottingham/emailvalidator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

rottingham/emailvalidator
=========================

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

5611[1 issues](https://github.com/rottingham/EmailValidator/issues)PHP

Since Nov 8Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rottingham/EmailValidator)[ Packagist](https://packagist.org/packages/rottingham/emailvalidator)[ RSS](/packages/rottingham-emailvalidator/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Email Validator
===============

[](#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.

For extended usage examples, see test files.

**Composer Ready**

Available on Packagist:

#### Sample Usage

[](#sample-usage)

Simply import the `Emailvalidator.class.php` file into your project if you are not using dependency injection.

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

```

##### Valiate Email

[](#valiate-email)

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

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

```

#### Check if Email Exists

[](#check-if-email-exists)

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

```
$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.

#### Email Lookup

[](#email-lookup)

You can use the `EmailValidator\SmtpLookup.class.php` class seperately by importing it into your project.

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

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0abca9598475c015c54bbe27de0c2ef4f9c0224e66a829e7f90b7a166c8a3c9?d=identicon)[rottingham](/maintainers/rottingham)

---

Top Contributors

[![rottingham](https://avatars.githubusercontent.com/u/4079423?v=4)](https://github.com/rottingham "rottingham (8 commits)")

### Embed Badge

![Health badge](/badges/rottingham-emailvalidator/health.svg)

```
[![Health](https://phpackages.com/badges/rottingham-emailvalidator/health.svg)](https://phpackages.com/packages/rottingham-emailvalidator)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
