wiki/content/20201117104659-dkim_email_authentication.md

681 B

date id title
20201117 fd4d659f-01f1-4246-87ec-b8073a363402 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