mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
SendGrid: add merge_metadata
Add support in SendGrid backend for per-recipient metadata.
This commit is contained in:
committed by
Mike Edmunds
parent
412a1b78c6
commit
85dce5fd6a
@@ -245,6 +245,7 @@ class BasePayload(object):
|
||||
('template_id', last, force_non_lazy),
|
||||
('merge_data', combine, force_non_lazy_dict),
|
||||
('merge_global_data', combine, force_non_lazy_dict),
|
||||
('merge_metadata', combine, force_non_lazy_dict),
|
||||
('esp_extra', combine, force_non_lazy_dict),
|
||||
)
|
||||
esp_message_attrs = () # subclasses can override
|
||||
@@ -495,6 +496,9 @@ class BasePayload(object):
|
||||
def set_merge_global_data(self, merge_global_data):
|
||||
self.unsupported_feature("merge_global_data")
|
||||
|
||||
def set_merge_metadata(self, merge_metadata):
|
||||
self.unsupported_feature("merge_metadata")
|
||||
|
||||
# ESP-specific payload construction
|
||||
def set_esp_extra(self, extra):
|
||||
self.unsupported_feature("esp_extra")
|
||||
|
||||
Reference in New Issue
Block a user