diff options
author | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 08:33:47 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 08:33:47 +0800 |
commit | 825c29b5e0740b27439003f21e1a1a74e563cfd5 (patch) | |
tree | 97e398b856abe9571efeedbf17e81ccc80118952 /X11/eww/scripts/mails | |
parent | 4496db3c021d735a324a28c46ce4a18f090270f5 (diff) |
Add eww config from aditaya
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())) | ||