diff options
Diffstat (limited to 'X11/eww/scripts/mails')
-rwxr-xr-x | X11/eww/scripts/mails | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/X11/eww/scripts/mails b/X11/eww/scripts/mails new file mode 100755 index 0000000..974d00a --- /dev/null +++ b/X11/eww/scripts/mails | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/python | ||
2 | |||
3 | import imaplib | ||
4 | obj = imaplib.IMAP4_SSL('imap.gmail.com',993) | ||
5 | obj.login('username@gmail.com','PASSWORD') # write your email and password | ||
6 | obj.select() | ||
7 | print(len(obj.search(None, 'UnSeen')[1][0].split())) | ||