joepsyko / zf-dkim
DKIM Signer for Zend Mail
Installs: 3 473
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^5.6 || ^7.0
This package is not auto-updated.
Last update: 2025-04-21 16:07:24 UTC
README
Zend Framework DKIM Signer.
Note
I tried to contact the original author of this project, but he ignore me, so I decide to clone the project and continue to improve it.
I will appreciate every contribution.
Installation
Installation of this module uses composer. For composer documentation, please refer to https://getcomposer.org.
php composer.phar require joepsyko/zf-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
**I.e. in your Controller:**
$mail = new \Zend\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 \Zend\Mail\Transport\Sendmail();
$transport->send($mail);
That's it.