Skip to content
Zend Framework 2 DKIM Signer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src/Dkim
CHANGELOG.md
LICENSE
Module.php
README.md
composer.json

README.md

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

  1. Create a DKIM domain key

  2. Configure the DkimSigner using the config.dist file

  3. 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.

You can’t perform that action at this time.