diff --git a/django_mailbox/management/commands/getmail.py b/django_mailbox/management/commands/getmail.py index 9cc7a81..c431834 100644 --- a/django_mailbox/management/commands/getmail.py +++ b/django_mailbox/management/commands/getmail.py @@ -1,8 +1,6 @@ from django.core.management.base import BaseCommand -from django.dispatch import receiver from django_mailbox.models import Mailbox -from django_mailbox.signals import message_received class Command(BaseCommand): def handle(self, *args, **options): @@ -11,8 +9,9 @@ class Command(BaseCommand): mailboxes = mailboxes.filter(name = ' '.join(args)) for mailbox in mailboxes: self.stdout.write('Gathering messages for %s\n' % mailbox.name) - mailbox.get_new_mail() - - @receiver(message_received) - def incoming_message(self, sender, message, **kwargs): - self.stdout.write('Received %s\n' % message.subject) + messages = mailbox.get_new_mail() + for message in messages: + self.stdout.write('Recieved %s (from %s)' % ( + message.subject, + message.from_address + )) diff --git a/setup.py b/setup.py index 6e401a3..281f07c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='django_mailbox', - version='0.1', + version='0.1.1', url='http://bitbucket.org/latestrevision/django-mailbox/', description='Automatically import mail from POP3 or IMAP into Django', author='Adam Coddington',