fastnloud / zf2-dkim
DKIM Signer for Zend Mail
Installs: 1 238
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 3
Open Issues: 2
Requires
- php: >=5.3.3
- zendframework/zendframework: >=2.3.0
This package is not auto-updated.
Last update: 2024-11-20 14:50:43 UTC
README
Zend Framework 2 DKIM Signer.
Installation
Installation of this module uses composer. For composer documentation, please refer to https://getcomposer.org.
php composer.phar require fastnloud/zf2-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('le subject');
// sign message with dkim
$signer = $this->getServiceLocator()->get('DkimSigner');
$signer->signMessage($mail);
// send message
$transport = new \Zend\Mail\Transport\Sendmail();
$transport->send($mail);
That's it.