feat: disable mailjet open and click tracking

This commit is contained in:
fromme committed 2026-11-10 17:25:16 +01:00
1 parent 77960fe81f
commit 980e378a7b
2 files changed
+45

No files matched your search

+8
View File
@@ -55,6 +55,14 @@ class Mailer
->context($context)
;
// Mailjet tracks per its account settings unless a message says otherwise: an open pixel
// and links rewritten through its redirect domain. These headers only work over SMTP - the
// Send API refuses them - and Symfony's SMTP transport passes them through untouched.
$email->getHeaders()
->addTextHeader('X-Mailjet-TrackOpen', '0')
->addTextHeader('X-Mailjet-TrackClick', '0')
;
foreach ($config['attachments'] as $attachment) {
/* @var EmailAttachmentInterface $attachment */
$attachment->attachTo($email);