mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Feature: Implement merge_headers
Implement and document `merge_headers` for all other ESPs that can support it. (See #371 for base and Amazon SES implementation.) Closes #374
This commit is contained in:
@@ -116,6 +116,19 @@ class SparkPostBackendIntegrationTests(AnymailTestMixin, SimpleTestCase):
|
||||
"to2@test.sink.sparkpostmail.com": {"value": "two"},
|
||||
},
|
||||
merge_global_data={"global": "global_value"},
|
||||
merge_metadata={
|
||||
"to1@test.sink.sparkpostmail.com": {"meta1": "one"},
|
||||
"to2@test.sink.sparkpostmail.com": {"meta1": "two"},
|
||||
},
|
||||
headers={
|
||||
"X-Custom": "custom header default",
|
||||
},
|
||||
merge_headers={
|
||||
# (Note that SparkPost doesn't support custom List-Unsubscribe headers)
|
||||
"to1@test.sink.sparkpostmail.com": {
|
||||
"X-Custom": "custom header one",
|
||||
},
|
||||
},
|
||||
)
|
||||
message.send()
|
||||
recipient_status = message.anymail_status.recipients
|
||||
|
||||
Reference in New Issue
Block a user