Add 0 for Inbox zero!
This commit is contained in:
parent
e2669dd265
commit
1d0e7089fd
@ -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....")
|
||||||
|
Loading…
Reference in New Issue
Block a user