fix: manual mark as seen after getting email
This commit is contained in:
parent
e54d35a9d7
commit
0ce2c5fb24
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
config.json
|
||||
*.log
|
||||
.vscode/
|
2
main.py
2
main.py
@ -89,6 +89,8 @@ def get_unforwarded_emails(account_config, logger):
|
||||
if isinstance(response_part, tuple):
|
||||
msg = email.message_from_bytes(response_part[1])
|
||||
emails.append((email_id, msg))
|
||||
imap.store(email_id, '+FLAGS', '\Seen')
|
||||
|
||||
imap.logout()
|
||||
if len(emails) > 0:
|
||||
logger.info(f"Retrieved {len(emails)} new emails from {account_config['email']}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user