Skip to content

Commit 4996043

Browse files
committed
feature #50148 [Mailer] Add X-Infobip-Track header to be able to disable tracking (ndousson)
This PR was merged into the 6.4 branch. Discussion ---------- [Mailer] Add X-Infobip-Track header to be able to disable tracking | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | symfony/symfony-docs#18169 # 📍 Context This PR add a new header to disable tracking that is now enabled by default with the Infobip API V3 (email). # ➕ New feature New payload attribute was added allowing end users to disable tracking. | Attribute | Type | Description | | --- | --- | --- | | X-Infobip-Track | boolean | Enable or disable open and click tracking. | Commits ------- 404f6c718c Add X-Infobip-Track header to be able to disable tracking
2 parents 9b6241d + ebf4267 commit 4996043

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add reporting behavior thanks to new attributes support
8+
* Add header to disable tracking that is enabled by default on API V3
89

910
6.2
1011
---

Tests/Transport/InfobipApiTransportTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ public function testSendEmailWithHeadersWithSuccess()
409409
->addTextHeader('X-Infobip-IntermediateReport', 'true')
410410
->addTextHeader('X-Infobip-NotifyUrl', 'https://foo.bar')
411411
->addTextHeader('X-Infobip-NotifyContentType', 'application/json')
412-
->addTextHeader('X-Infobip-MessageId', 'RANDOM-CUSTOM-ID');
412+
->addTextHeader('X-Infobip-MessageId', 'RANDOM-CUSTOM-ID')
413+
->addTextHeader('X-Infobip-Track', 'false');
413414

414415
$sentMessage = $this->transport->send($email);
415416

@@ -421,6 +422,7 @@ public function testSendEmailWithHeadersWithSuccess()
421422
X-Infobip-NotifyUrl: https://foo.bar
422423
X-Infobip-NotifyContentType: application/json
423424
X-Infobip-MessageId: RANDOM-CUSTOM-ID
425+
X-Infobip-Track: false
424426
%a
425427
TXT,
426428
$sentMessage->toString()

Transport/InfobipApiTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ final class InfobipApiTransport extends AbstractApiTransport
3838
'X-Infobip-NotifyUrl' => 'notifyUrl',
3939
'X-Infobip-NotifyContentType' => 'notifyContentType',
4040
'X-Infobip-MessageId' => 'messageId',
41+
'X-Infobip-Track' => 'track',
4142
];
4243

4344
private string $key;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy