Add 0 for Inbox zero!

This commit is contained in:
Ahosking 2024-12-30 18:58:09 +00:00
parent e2669dd265
commit 1d0e7089fd

View File

@ -38,7 +38,7 @@ for account in accounts:
resp_code, response = None, None resp_code, response = None, None
print("Response Code : {}".format(resp_code)) print("Response Code : {}".format(resp_code))
print("Response : {}\n".format(response[0].decode())) #print("Response : {}\n".format(response[0].decode()))
imap_ssl.select('inbox') imap_ssl.select('inbox')
resp_code, messages = imap_ssl.search(None, 'UnSeen') resp_code, messages = imap_ssl.search(None, 'UnSeen')
@ -48,7 +48,8 @@ for account in accounts:
# print(messages[0].split()) # print(messages[0].split())
unread_messages = len(messages[0].split()) unread_messages = len(messages[0].split())
else: else:
print('False') print('No unread emails?!')
unread_messages = 0
############### Logout of Mailbox ###################### ############### Logout of Mailbox ######################
print("\nLogging Out....") print("\nLogging Out....")