1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

Enable folder function for gmail

This commit is contained in:
Mike Varga 2022-10-15 14:12:51 -04:00
parent 98942fb584
commit 5042ccc1fe
2 changed files with 10 additions and 8 deletions

View file

@ -216,7 +216,8 @@ class Mailbox(models.Model):
self.location,
port=self.port if self.port else None,
ssl=True,
archive=self.archive
archive=self.archive,
folder=self.folder,
)
conn.connect(self.username, self.password)
elif self.type == 'pop3':
@ -429,9 +430,9 @@ class Mailbox(models.Model):
if not connection:
return
since = self.last_polling
if since is None:
since = now() - timedelta(days=INITIAL_IMPORT_LOOKBACK_DAYS)
# since = self.last_polling
# if since is None:
since = now() - timedelta(days=INITIAL_IMPORT_LOOKBACK_DAYS)
for message in connection.get_message_ro(since=since):
msg = self.process_incoming_message(message)