Skip to content

Instantly share code, notes, and snippets.

View mjseeley's full-sized avatar

Mike Seeley mjseeley

  • Mt. Sterling, Illinois
View GitHub Profile
@mjseeley
mjseeley / dlAttachments.py
Last active October 17, 2020 12:32 — forked from baali/dlAttachments.py
Forked to add downloading of files with the same name and different contents. | WARNING: [messy code]
# Download ALL attachments from GMail
# 1. Script needs to be run via console not in an IDE, getpass.getpass() will fail otherwise.
# https://docs.python.org/2/library/getpass.html
# 2. Make sure you have IMAP enabled in your GMail settings.
# https://support.google.com/mail/troubleshooter/1668960?hl=en
# 3. If you are using 2 step verification you may need an APP Password.
# https://support.google.com/accounts/answer/185833
# 4. Reference information for GMail IMAP extension can be found here.
# https://developers.google.com/gmail/imap_extensions