mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Add inbound mail handling
Add normalized event, signal, and webhooks for inbound mail. Closes #43 Closes #86
This commit is contained in:
@@ -433,6 +433,18 @@ def rfc2822date(dt):
|
||||
return formatdate(timeval, usegmt=True)
|
||||
|
||||
|
||||
def angle_wrap(s):
|
||||
"""Return s surrounded by angle brackets, added only if necessary"""
|
||||
# This is the inverse behavior of email.utils.unquote
|
||||
# (which you might think email.utils.quote would do, but it doesn't)
|
||||
if len(s) > 0:
|
||||
if s[0] != '<':
|
||||
s = '<' + s
|
||||
if s[-1] != '>':
|
||||
s = s + '>'
|
||||
return s
|
||||
|
||||
|
||||
def is_lazy(obj):
|
||||
"""Return True if obj is a Django lazy object."""
|
||||
# See django.utils.functional.lazy. (This appears to be preferred
|
||||
|
||||
Reference in New Issue
Block a user