PHPackages                             tomcan/dkimvalidator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tomcan/dkimvalidator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tomcan/dkimvalidator
====================

A DKIM signature validator in PHP.

v0.4.3(1y ago)019MITPHPPHP &gt;=7.2.0

Since Jan 29Pushed 1y agoCompare

[ Source](https://github.com/TomCan/DKIMValidator)[ Packagist](https://packagist.org/packages/tomcan/dkimvalidator)[ RSS](/packages/tomcan-dkimvalidator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

PHP DKIM Validator
==================

[](#php-dkim-validator)

A straightforward validation class for checking DKIM signatures and header settings. Requires PHP 7.2 or later.

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

[](#installation)

```
composer require tomcan/dkimvalidator

```

Usage
-----

[](#usage)

```
use TomCan\DKIMValidator\Validator;
use TomCan\DKIMValidator\DKIMException;
require 'vendor/autoload.php';
//Put a whole raw email message in here
//Load the message directly from disk -
//don't copy & paste it as that will likely affect line breaks & charsets
$message  = file_get_contents('message.eml');
$dkimValidator = new Validator($message);
try {
    if ($dkimValidator->validateBoolean()) {
        echo "Cool, it's valid";
    } else {
        echo 'Uh oh, dodgy email!';
    }
} catch (DKIMException $e) {
    echo $e->getMessage();
}
```

Changelog
=========

[](#changelog)

- Original package [angrychimp/php-dkim](https://github.com/angrychimp/php-dkim);
- Forked by [teon/dkimvalidator](https://github.com/teonsystems/php-dkim).
- Forked into [phpmailer/dkimvalidator](https://github.com/PHPMailer/DKIMValidator) by Marcus Bointon (Synchro) in October 2019:
    - Restructuring
    - Cleanup for PSR-12 and PHP 7.2
    - Various bug fixes and new features.
- Forked into [tomcan/dkimvalidator](https://github.com/PHPMailer/DKIMValidator) by Tom Cannaerts (TomCan) in Januari 2025:
    - Return more details in the result

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance42

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

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

Every ~1 days

Total

4

Last Release

471d ago

### Community

Maintainers

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

---

Top Contributors

[![angrychimp](https://avatars.githubusercontent.com/u/744224?v=4)](https://github.com/angrychimp "angrychimp (12 commits)")[![bostjan](https://avatars.githubusercontent.com/u/107080?v=4)](https://github.com/bostjan "bostjan (10 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (9 commits)")[![TomCan](https://avatars.githubusercontent.com/u/2892620?v=4)](https://github.com/TomCan "TomCan (6 commits)")[![pimlie](https://avatars.githubusercontent.com/u/1067403?v=4)](https://github.com/pimlie "pimlie (5 commits)")[![slimlv](https://avatars.githubusercontent.com/u/818598?v=4)](https://github.com/slimlv "slimlv (3 commits)")[![ToTheMax](https://avatars.githubusercontent.com/u/21971014?v=4)](https://github.com/ToTheMax "ToTheMax (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tomcan-dkimvalidator/health.svg)

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

PHPackages © 2026

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