Merge pull request #1739 from r1b/fix-mailbox-parsing

bugfix: support name-addr mailbox form
This commit is contained in:
Steve Pulec 2018-09-22 16:57:58 -04:00 committed by GitHub
commit 65570d0f6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,8 @@ class SESBackend(BaseBackend):
self.sent_messages = []
self.sent_message_count = 0
def _is_verified_address(self, address):
def _is_verified_address(self, source):
_, address = parseaddr(source)
if address in self.addresses:
return True
user, host = address.split('@', 1)