From 250dbf6a1caa5b0ab9bf89fe0413fc3a2b81ba06 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 22 Nov 2023 13:09:34 +0530 Subject: [PATCH] fix(email): Allow users to pull all (read & unread) emails during initial sync --- frappe/email/receive.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frappe/email/receive.py b/frappe/email/receive.py index 381d43a124..2d81edd297 100644 --- a/frappe/email/receive.py +++ b/frappe/email/receive.py @@ -236,11 +236,6 @@ class EmailServer: EmailAccount.uidnext, uidnext ).where(EmailAccount.name == self.settings.email_account_name).run() - # uid validity not found pulling emails for first time - if not uid_validity: - self.settings.email_sync_rule = "UNSEEN" - return - sync_count = 100 if uid_validity else int(self.settings.initial_sync_count) from_uid = ( 1 if uidnext < (sync_count + 1) or (uidnext - sync_count) < 1 else uidnext - sync_count