README
Zend Framework 2 DKIM Signer., (*1)
Installation, (*2)
Installation of this module uses composer. For composer documentation, please refer to https://getcomposer.org., (*3)
php composer.phar require fastnloud/zf2-dkim, (*4)
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., (*5)
Usage, (*6)
-
Create a DKIM domain key, (*7)
-
Configure the DkimSigner using the config.dist file, (*8)
-
Sign & send, (*9)
I.e. in your Controller:, (*10)
$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);
, (*11)
That's it., (*12)