tobymaxham/laravel-dkim

This package can enable DKIM for your Laravel mails.

v3.0 2024-11-18 17:36 UTC

This package is auto-updated.

Last update: 2024-12-18 17:48:37 UTC


README

Latest Version on Packagist Total Downloads

This package can be used to add a DKIM signature to your outgoing mails.

Instead of changing the default Laravel Mailer, Laravel DKIM will listen for the \Illuminate\Mail\Events\MessageSending Event and then call the \TobyMaxham\LaravelDkimSigner\Listener\ApplyDkimSignature Listener.

This keeps your Laravel Mailer behavior or any changes you have done inside your projects.

Installation

You can install the package via composer:

composer require tobymaxham/laravel-dkim

Usage

If you are using Laravel with auto discovery you have nothing to do. Be sure the package Service Provider TobyMaxham\LaravelDkimSigner\DkimSignerProvider is registered in your config/app.php file.

You can disable the signer by setting the dkim_signer_enabled config value to false.

<?php

return [
    'dkim_signer_enabled' => env('MAIL_DKIM_ENABLED', true),
];

Generate Key

# Generate new DKIM Key
openssl genrsa -out dkim_private.pem 2048

# Get the public Key
openssl ec -in dkim_private.pem -pubout -outform der | openssl base64 -A

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

If you've found a bug regarding security please mail git@maxham.de instead of using the issue tracker.

Support me

ko-fi

Credits

License

The MIT License (MIT). Please see License File for more information.