1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00
django-mailbox/django_mailbox/management/commands/getmail.py
Jace Manshadi 462fdd3e49
updating location of logic for getmail command (#264)
* moving logic for processing all the new emails from all mailboxes to a method under Mailbox so it can be called from other modules

* moving logger lines into handle method as requested
2023-01-24 06:08:47 -08:00

11 lines
278 B
Python

import logging
from django.core.management.base import BaseCommand
from django_mailbox.models import Mailbox
class Command(BaseCommand):
def handle(self, *args, **options):
logging.basicConfig(level=logging.INFO)
Mailbox.get_new_mail_all_mailboxes(args)