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('[email protected]')
    // ...
    ->html('...');
 
$signer = new DkimSigner('file:///path/to/private-key.key', 'example.com', 'sf');
$signedEmail = $signer->sign($email);

Footnotes

Footnotes

  1. https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail

  2. https://symfony.com/doc/master/mailer.html#dkim-signer