metalinspired / laminas-dkim
DKIM Signer for Laminas Mail
Installs: 11 969
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: ^8.1
- ext-openssl: *
- laminas/laminas-mail: ^2.17
Requires (Dev)
- laminas/laminas-coding-standard: ^2.4
- laminas/laminas-servicemanager: ^3.16
- phpstan/phpstan: ^1.8.4
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-12 20:38:07 UTC
README
Laminas Project DKIM Signer.
Note
Based on joepsyko/zf-dkim
Installation
composer require metalinspired/laminas-dkim
Create a ./config/autoload/dkim.global.php and ./config/autoload/dkim.local.php file with the configuration variable values as described in the project .dist files.
Usage
-
Create a DKIM domain key
-
Configure the DkimSigner using the config.dist file
-
Sign & send
$mail = new \Laminas\Mail\Message();
$mail->setBody("Hello world!");
$mail->setFrom('from@example.com');
$mail->addTo('to@example.com');
$mail->setSubject('subject');
// Sign message with dkim
$signer = $this->getServiceLocator()->get(\Dkim\Signer\Signer::class);
$signer->signMessage($mail);
// Send message
$transport = new \Laminas\Mail\Transport\Sendmail();
$transport->send($mail);