1
0
Fork 0
django-mailbox/django_mailbox/transports/base.py
Pascal F 7fde5f7165
Support for Django 5.0 and python 3.12 + Fix CI (#277)
* Upgrade to last Django & Python supported versions

* flake8 fixes

* Add CI

* Add final version of Django 5.0
2023-12-09 19:01:53 -08:00

11 lines
294 B
Python

import email
# Do *not* remove this, we need to use this in subclasses of EmailTransport
from email.errors import MessageParseError # noqa: F401
class EmailTransport:
def get_email_from_bytes(self, contents):
message = email.message_from_bytes(contents)
return message