mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
adds testable repo with added features
This commit is contained in:
parent
62805f324e
commit
c7997ebd9b
58 changed files with 2421 additions and 1541 deletions
|
|
@ -13,18 +13,11 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
mailboxes = Mailbox.active_mailboxes.all()
|
||||
if args:
|
||||
mailboxes = mailboxes.filter(
|
||||
name=' '.join(args)
|
||||
)
|
||||
mailboxes = mailboxes.filter(name=" ".join(args))
|
||||
for mailbox in mailboxes:
|
||||
logger.info(
|
||||
'Gathering messages for %s',
|
||||
mailbox.name
|
||||
)
|
||||
logger.info("Gathering messages for %s", mailbox.name)
|
||||
messages = mailbox.get_new_mail()
|
||||
for message in messages:
|
||||
logger.info(
|
||||
'Received %s (from %s)',
|
||||
message.subject,
|
||||
message.from_address
|
||||
"Received %s (from %s)", message.subject, message.from_address
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue