mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
SparkPost: drop support for multiple from_email (#213)
SparkPost's API no longer allows this, and now returns a confusing error message about return_path. (Not treating as a breaking change in Anymail, because the breaking change was in the SparkPost API. This just improves the error message in the unlikely event anyone is trying to use this feature.) Closes #212
This commit is contained in:
@@ -117,10 +117,8 @@ class SparkPostPayload(RequestsPayload):
|
||||
"recipients": [],
|
||||
}
|
||||
|
||||
def set_from_email_list(self, emails):
|
||||
# SparkPost supports multiple From email addresses,
|
||||
# as a single comma-separated string
|
||||
self.data["content"]["from"] = ", ".join(email.address for email in emails)
|
||||
def set_from_email(self, email):
|
||||
self.data["content"]["from"] = email.address
|
||||
|
||||
def set_to(self, emails):
|
||||
if emails:
|
||||
|
||||
Reference in New Issue
Block a user