Download the PHP package jv-conseil/dkim-php-mail-signature without Composer
On this page you can find all versions of the php package jv-conseil/dkim-php-mail-signature. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jv-conseil/dkim-php-mail-signature
More information about jv-conseil/dkim-php-mail-signature
Files in jv-conseil/dkim-php-mail-signature
Package dkim-php-mail-signature
Short Description 🔏 Stand-alone DKIM class to sign your emails with a 2048 bit private key hashed with SHA-256 algorithm.
License EUPL-1.2
Homepage http://www.jv-conseil.net
Informations about the package dkim-php-mail-signature
DkimPhpMailSignature
🔏 Stand-alone DKIM class to sign your emails with a 2048 bit private key hashed with SHA-256 algorithm.
Usage
Sample lines to import into your mail code to start signing with DKIM:
Installation
Step by Step guide to generate your encryption keys and populate them through your DNS records.
Installation & loading
DkimPhpMailSignature is available on Packagist (using semantic versioning), and installation via Composer is the recommended way to install DkimPhpMailSignature. Just add this line to your composer.json
file:
or run
Note that the vendor
folder and the vendor/autoload.php
script are generated by Composer; they are not part of DkimPhpMailSignature.
Make your own copy of config file
Before starting you should make a copy of folder config/
and store it outside your vendor/
Composer repository in a non-public area of your website e.g.:
Failing to do so will expose you to lose all your settings in case of a future Composer udpate.
Generate your Public & Private Encryption keys
In Terminal enter this command line to start working under the path of your config/
folder:
In Terminal enter this command line to generate a new private 2048 bit encryption key:
Enter your Pass Phrase and save it for editing your config.inc.php
file in the next step.
Then retrieve your public key:
You can delete the two originals *.pem
file keys stored in the config/
folder if they create a conflict in the creation process of your keys.
Edit your DNS with a new DKIM record
Access your registrar interface (e.g.: OVH.com) and create a new DKIM record to declare your public key:
DKIM works better with SPF and DMARC records, you should consider editing them too:
Further reading:
- Add DKIM domain key to domain DNS records
- Manage suspicious emails with DMARC
- Help prevent email spoofing with SPF records
Edit your Config File
Under config/config.sample.inc.php
you will find a config file example to help you set your own details.
Now you can drop .sample
in the filename and start editing it:
- domain: your domain name e.g: google.com
- selector:
selector
used in your DKIM DNS record, e.g.: selector._domainkey.MAIL_DKIM_DOMAIN - passphrase: your pass phrase used to generate your keys e.g.: myPassPhrase.
- ... other parameters can be omitted.
Simple Use
Sample lines to import into your mail code to start signing with DKIM:
Introducing DKIMmail class
📬 Stand-alone class to send DKIM signed emails with a 2048 bit private key hashed with SHA-256 algorithm.
Documentation
Documentation is available online, though it may not be quite up to date or match your version exactly.
You can generate API documentation by running phpdoc
in the top-level folder of this project, and documentation will be generated in this folder:
You will need to have phpDocumentor installed.
Sponsorship
If this project helps you reduce time to develop, you can give me a cup of coffee ☕️ :-)