profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

DKIM Email Authentication

Description

DKIM1 is supported by the Mailer Component. There is also documentation2.

Syntax

use Symfony\Component\Mime\Crypto\DkimSigner;
use Symfony\Component\Mime\Email;

$email = (new Email())
    ->from('hello@example.com')
    // ...
    ->html('...');

$signer = new DkimSigner('file:///path/to/private-key.key', 'example.com', 'sf');
$signedEmail = $signer->sign($email);

Footnotes