Coder Social home page Coder Social logo

veidenbaums / laravel-dkim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonschaufi/laravel-dkim

0.0 1.0 0.0 24 KB

Laravel package for signing outgoing messages with DKIM

Home Page: https://www.simonschaufelberger.de/de/projekte/laravel-packages/laravel-dkim.html

License: MIT License

PHP 100.00%

laravel-dkim's Introduction

Laravel DKIM

Donate GitHub Sponsors Buy me a coffee GitHub Packagist Downloads Laravel 9

A Laravel package, that allows signing emails with DKIM.

Installation

composer require simonschaufi/laravel-dkim

After that, you should publish the config file with:

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

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,

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

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.

laravel-dkim's People

Contributors

simonschaufi avatar veidenbaums avatar mrjose avatar lipa77 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.