New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

simonschaufi/laravel-dkim

Laravel package for signing outgoing messages with DKIM.
184,763 29

Larablocks Analysis

simonschaufi/laravel-dkim works with Laravel 9 to 13 (latest release v3.6.0, Mar 5, 2026).

Laravel 7 and 8 in earlier releases.

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Mar 5, 2026)
  • 9,558 downloads a month (needs 10,000)
  • 29 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Mar 5, 2026.
  • 1 release in the last 12 months.
  • First released: Apr 29, 2020.
  • Monthly downloads: 9,558.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require simonschaufi/laravel-dkim
Latest Version:v3.6.0
Laravel:9 – 13
Older releases:7 · 8
License:MIT
Last Updated:Mar 5, 2026
Links: GitHub  ·  Packagist
Maintainer: simonschaufi

Laravel DKIM

Donate GitHub Sponsors Buy me a coffee GitHub Packagist Downloads Laravel 9/10/11/12/13

A Laravel package, that allows signing emails with DKIM.

Installation

composer require simonschaufi/laravel-dkim

In Laravel version before 11, the providers array in config/app.php has an entry with Illuminate\Mail\MailServiceProvider::class. Comment this line out and add your own service provider entry (in the "Package Service Providers" section):

/*
 * Package Service Providers...
 */
SimonSchaufi\LaravelDKIM\DKIMMailServiceProvider::class,

In Laravel 11/12, add this to your bootstrap/app.php:

->withProviders([
    \SimonSchaufi\LaravelDKIM\DKIMMailServiceProvider::class,
])

The DKIMMailServiceProvider extends the MailServiceProvider and overwrites a method that we need for our own behavior.

After that, you should publish the config file with:

php artisan vendor:publish --provider="SimonSchaufi\LaravelDKIM\DKIMMailServiceProvider" --tag dkim-config

Next we need to create a private and public key pair for signing and verifying the email.

There are many tools available to generate the necessary keys but here is one which is easy to use:

https://tools.socketlabs.com/dkim/generator

Enter your domain and in the "selector" field enter default, or adjust the "selector" in the laravel config file accordingly. Leave the remaining fields as they are.

After you have generated the keys and added the public key to your dns record, here is a tool to validate it:

https://www.mail-tester.com/spf-dkim-check

Finally, store the private key for example in storage/app/dkim/private_key.txt and configure your settings in .env:

DKIM_DOMAIN=example.com

If you placed the private key somewhere else, you need to set the full absolute path in the environment variable or adjust the storage path in the config file.

If you find this package helpful, please consider a donation! Links are on top of this file.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released Laravel License
v3.6.0 ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
v3.5.0 ^9.0 || ^10.0 || ^11.0 || ^12.0 MIT
v3.4.2 ^9.0 || ^10.0 || ^11.0 MIT
v3.4.1 ^9.0 || ^10.0 || ^11.0 MIT
v3.4.0 ^9.0 || ^10.0 || ^11.0 MIT