New in Symfony 5.2: DKIM email authentication
DKIM (DomainKeys Identified Mail) is an email authentication method designed to detect forged sender addresses in emails (email spoofing), a technique often used in phishing and email spam.
DKIM allows the receiver to check that an email claimed to have come from a specific domain was indeed authorized by the owner of that domain. In Symfony 5.2 we’ve added support for DKIM in the Mailer component to allow you affix a digital signature, linked to a domain name, to each outgoing email messages:
1 2 3 4 5 6 7 8 9 10
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);
Read the DKIM signer docs to learn about all the available configuration options.
New in Symfony 5.2: DKIM email authentication symfony.com/blog/new-in-symfony-5-2-dkim-email-authenticationTweet this
Become a certified developer! Exams are online and available in all countries.Register Now
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.