8000 feature #50148 [Mailer] Add X-Infobip-Track header to be able to disa… · symfony/symfony@f6723ab · GitHub
[go: up one dir, main page]

Skip to content

Commit f6723ab

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 ------- 404f6c7 Add X-Infobip-Track header to be able to disable tracking
2 parents 2446920 + 404f6c7 commit f6723ab

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/Symfony/Component/Mailer/Bridge/Infobip/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
---

src/Symfony/Component/Mailer/Bridge/Infobip/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()

src/Symfony/Component/Mailer/Bridge/Infobip/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)
0