1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Use TO header for creating mailbox name.

--HG--
branch : exim4_pipe
This commit is contained in:
me@adamcoddington.net 2012-10-08 15:33:07 +00:00
parent ffbf4ace6b
commit 00a4bde767

View file

@ -21,7 +21,7 @@ class Command(BaseCommand):
logger.warning("Message not processable.")
def get_mailbox_for_message(self, message):
email_address = rfc822.parseaddr(message['from'])[1][0:255]
email_address = rfc822.parseaddr(message['to'])[1][0:255]
mailbox, created = Mailbox.objects.get_or_create(
name=email_address,
)