diff --git a/django_mailbox/management/commands/getmail.py b/django_mailbox/management/commands/getmail.py index 5f1aad3..e74f683 100644 --- a/django_mailbox/management/commands/getmail.py +++ b/django_mailbox/management/commands/getmail.py @@ -8,6 +8,8 @@ class Command(BaseCommand): if args: mailboxes = mailboxes.filter(name = ' '.join(args)) for mailbox in mailboxes: + if not mailbox.uri: + continue self.stdout.write('Gathering messages for %s\n' % mailbox.name) messages = mailbox.get_new_mail() for message in messages: