PHPackages                             justinwang/mailgun-email-validation - 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. justinwang/mailgun-email-validation

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

justinwang/mailgun-email-validation
===================================

Use Mailgun email validation service to validate email

v1.0.0(7y ago)19MITPHP

Since Apr 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/HiYue/mailgun-email-validation)[ Packagist](https://packagist.org/packages/justinwang/mailgun-email-validation)[ RSS](/packages/justinwang-mailgun-email-validation/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Email validator with MailGun Service API V3 + V4
================================================

[](#email-validator-with-mailgun-service-api-v3--v4)

About Mailgun email validator
-----------------------------

[](#about-mailgun-email-validator)

To validate an email address which submitted by your customer, prevent your website from bad reputation. Easy, fast, simple and **highly testable**.

Installation
------------

[](#installation)

Require this package in your composer.json and update your dependencies:

```
composer require justinwang/mailgun-email-validation
```

Requirements
------------

[](#requirements)

**You need to register at [Mailgun](https://www.mailgun.com/) first**.

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';  // Put this line if necessary

use Yue\MailGunEmailValidation\EmailValidator;

// Init the configurations
$config = [
    // Required: Public validation key, in your Mailgun settings.
    'public_key'    =>'your_public_validation_key',

    // Required: Private API key, in your Mailgun settings.
    'private_key'   =>'your_private_api_key',

    // Optional: By default, we will use V4 version API
    'version'       =>EmailValidator::V3,
];

// Get validator instance
$validator = EmailValidator::GetInstance($config);

// Validate an email
$email = 'example@your_domain.com';
try{
    $result = $validator->validate($email);
    $valid  = $result->success();   // true for the valid email
}catch (\Exception $exception){
    var_dump($exception->getMessage());
}

// Todo: next ...
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2572d ago

### Community

Maintainers

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

---

Top Contributors

[![JustinWang24](https://avatars.githubusercontent.com/u/1173893?v=4)](https://github.com/JustinWang24 "JustinWang24 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/justinwang-mailgun-email-validation/health.svg)

```
[![Health](https://phpackages.com/badges/justinwang-mailgun-email-validation/health.svg)](https://phpackages.com/packages/justinwang-mailgun-email-validation)
```

###  Alternatives

[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[robertogallea/laravel-codicefiscale

Codice fiscale validation for php/laravel

58151.6k1](/packages/robertogallea-laravel-codicefiscale)[deligoez/tckimlikno

Turkish Identification Number Verification &amp; Validation Package for Laravel

2917.4k](/packages/deligoez-tckimlikno)[speelpenning/laravel-postcode-nl

A Laravel client using the Postcode.eu REST API for Dutch address verification.

1221.1k](/packages/speelpenning-laravel-postcode-nl)

PHPackages © 2026

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