diff --git a/django_mailbox/management/commands/getmail.py b/django_mailbox/management/commands/getmail.py index 2ee8947..6041782 100644 --- a/django_mailbox/management/commands/getmail.py +++ b/django_mailbox/management/commands/getmail.py @@ -11,7 +11,7 @@ class Command(BaseCommand): self.stdout.write('Gathering messages for %s\n' % mailbox.name) messages = mailbox.get_new_mail() for message in messages: - self.stdout.write('Recieved %s (from %s)\n' % ( + self.stdout.write('Received %s (from %s)\n' % ( message.subject, message.from_address )) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 098ff36..b0325e5 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -170,6 +170,10 @@ class Mailbox(models.Model): if part.get('Content-Disposition') is None: continue filename = part.get_filename() + # ignore SMIME extension + filename_basename, filename_extension = os.path.splitext(filename) + if filename_extension in ('.p7s',): + continue data = part.get_payload(decode=True) if not data: continue