mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
Add pluggable transport registry
This commit is contained in:
parent
201f568750
commit
6ded51bcde
4 changed files with 18 additions and 2 deletions
|
|
@ -17,3 +17,10 @@ class EmailTransport(object):
|
|||
message = email.message_from_string(contents)
|
||||
|
||||
return message
|
||||
|
||||
|
||||
class PluggableEmailTransport(EmailTransport):
|
||||
@classmethod
|
||||
def from_uri(cls, uri):
|
||||
raise NotImplemented("The class does not implement {0}.from_uri, and it should. "
|
||||
"Overwrite {0}.from_uri.".format(cls.__name__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue