@@ -248,7 +248,11 @@ public function testSendEmailWithHeadersShouldCalledInfobipWithTheRightParameter
248
248
->addTextHeader ('X-Infobip-IntermediateReport ' , 'true ' )
249
249
->addTextHeader ('X-Infobip-NotifyUrl ' , 'https://foo.bar ' )
250
250
->addTextHeader ('X-Infobip-NotifyContentType ' , 'application/json ' )
251
- ->addTextHeader ('X-Infobip-MessageId ' , 'RANDOM-CUSTOM-ID ' );
251
+ ->addTextHeader ('X-Infobip-MessageId ' , 'RANDOM-CUSTOM-ID ' )
252
+ ->addTextHeader ('X-Infobip-Track ' , 'false ' )
253
+ ->addTextHeader ('X-Infobip-TrackingUrl ' , 'https://bar.foo ' )
254
+ ->addTextHeader ('X-Infobip-TrackClicks ' , 'true ' )
255
+ ->addTextHeader ('X-Infobip-TrackOpens ' , 'true ' );
252
256
253
257
$ this ->transport ->send ($ email );
254
258
@@ -280,6 +284,30 @@ public function testSendEmailWithHeadersShouldCalledInfobipWithTheRightParameter
280
284
Content-Disposition: form-data; name="messageId"
281
285
282
286
RANDOM-CUSTOM-ID
287
+ --%s
288
+ Content-Type: text/plain; charset=utf-8
289
+ Content-Transfer-Encoding: 8bit
290
+ Content-Disposition: form-data; name="track"
291
+
292
+ false
293
+ --%s
294
+ Content-Type: text/plain; charset=utf-8
295
+ Content-Transfer-Encoding: 8bit
296
+ Content-Disposition: form-data; name="trackingUrl"
297
+
298
+ https://bar.foo
299
+ --%s
300
+ Content-Type: text/plain; charset=utf-8
301
+ Content-Transfer-Encoding: 8bit
302
+ Content-Disposition: form-data; name="trackClicks"
303
+
304
+ true
305
+ --%s
306
+ Content-Type: text/plain; charset=utf-8
307
+ Content-Transfer-Encoding: 8bit
308
+ Content-Disposition: form-data; name="trackOpens"
309
+
310
+ true
283
311
--%s--
284
312
TXT,
285
313
$ options ['body ' ]
@@ -410,7 +438,10 @@ public function testSendEmailWithHeadersWithSuccess()
410
438
->addTextHeader ('X-Infobip-NotifyUrl ' , 'https://foo.bar ' )
411
439
->addTextHeader ('X-Infobip-NotifyContentType ' , 'application/json ' )
412
440
->addTextHeader ('X-Infobip-MessageId ' , 'RANDOM-CUSTOM-ID ' )
413
- ->addTextHeader ('X-Infobip-Track ' , 'false ' );
441
+ ->addTextHeader ('X-Infobip-Track ' , 'false ' )
442
+ ->addTextHeader ('X-Infobip-TrackingUrl ' , 'https://bar.foo ' )
443
+ ->addTextHeader ('X-Infobip-TrackClicks ' , 'true ' )
444
+ ->addTextHeader ('X-Infobip-TrackOpens ' , 'true ' );
414
445
415
446
$ sentMessage = $ this ->transport ->send ($ email );
416
447
@@ -423,6 +454,9 @@ public function testSendEmailWithHeadersWithSuccess()
<
8000
/tr>423
454
X-Infobip-NotifyContentType: application/json
424
455
X-Infobip-MessageId: RANDOM-CUSTOM-ID
425
456
X-Infobip-Track: false
457
+ X-Infobip-TrackingUrl: https://bar.foo
458
+ X-Infobip-TrackClicks: true
459
+ X-Infobip-TrackOpens: true
426
460
%a
427
461
TXT,
428
462
$ sentMessage ->toString ()
0 commit comments