mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Fix empty strings in AnymailInboundMessage from/to/cc
Fix AnymailInboundMessage.to, .cc, .from_email when message was built with AnymailInboundMessage.construct using empty strings for those params. (Postmark inbound relies on this.) Fixes #307
This commit is contained in:
@@ -113,7 +113,10 @@ class AnymailInboundMessage(Message):
|
||||
"""
|
||||
values = self.get_all(header)
|
||||
if values is not None:
|
||||
values = parse_address_list(values)
|
||||
if "".join(values).strip() == "":
|
||||
values = None
|
||||
else:
|
||||
values = parse_address_list(values)
|
||||
return values or []
|
||||
|
||||
def get_date_header(self, header):
|
||||
|
||||
Reference in New Issue
Block a user