diff --git a/django_mailbox/management/commands/processincomingmessage.py b/django_mailbox/management/commands/processincomingmessage.py new file mode 100644 index 0000000..15d8b7b --- /dev/null +++ b/django_mailbox/management/commands/processincomingmessage.py @@ -0,0 +1,14 @@ +import email +import ipdb +import sys + +from django.core.managemet.base import BaseCommand + +from django_mailbox.models import Mailbox, Message + +class Command(BaseCommand): + def handle(self, *args, **options): + message_string = open(sys.stdin, 'r').read() + ipdb.set_trace() + #message = email.message_from_string(message_string) + diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 50ea5d8..f293850 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -22,7 +22,9 @@ class Mailbox(models.Model):
Be sure to urlencode your username and password should they contain illegal characters (like @, :, etc). - """ + """, + blank=True, + default=None, ) @property