From 1d0e7089fdd6d473fdace200249ac2ed7f177ae0 Mon Sep 17 00:00:00 2001 From: Ahosking Date: Mon, 30 Dec 2024 18:58:09 +0000 Subject: [PATCH] Add 0 for Inbox zero! --- gmail/email_count.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gmail/email_count.py b/gmail/email_count.py index 06c88cb..d9da918 100644 --- a/gmail/email_count.py +++ b/gmail/email_count.py @@ -38,7 +38,7 @@ for account in accounts: resp_code, response = None, None print("Response Code : {}".format(resp_code)) - print("Response : {}\n".format(response[0].decode())) + #print("Response : {}\n".format(response[0].decode())) imap_ssl.select('inbox') resp_code, messages = imap_ssl.search(None, 'UnSeen') @@ -48,7 +48,8 @@ for account in accounts: # print(messages[0].split()) unread_messages = len(messages[0].split()) else: - print('False') + print('No unread emails?!') + unread_messages = 0 ############### Logout of Mailbox ###################### print("\nLogging Out....")