Last active
May 3, 2019 22:19
-
-
Save mtimkovich/9a38508f93b956878b1b28aeeef5f992 to your computer and use it in GitHub Desktop.
For Claire. Marks all emails as read.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from imapclient import IMAPClient, SEEN | |
auth = { | |
# Enter your user name and password between the quotes below. | |
'username': 'USERNAME', | |
'password': 'PASSWORD', | |
'host': 'imap.gmail.com', | |
} | |
mail = IMAPClient(auth['host'], ssl=True) | |
mail.login(auth['username'], auth['password']) | |
mail.select_folder('INBOX') | |
msgs = mail.search(['UNSEEN']) | |
mail.add_flags(msgs, [SEEN]) | |
mail.logout() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python get-pip.py | |
python -m pip install --user imapclient | |
python mail.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash run.sh
from the command line