This is a Python package that allows you to save email attachments to a file, on specific folder according to rules/filters.
You can save the files to:
- Local storage
- GDrive
Example tests.py
IMAP_HOST=mail.infomaniak.com
IMAP_PORT=993
SMPT_HOST=mail.infomaniak.com
SMTP_PORT=465
[email protected]
EMAIL_PASSWORD="SUPERPASSWORD"
[email protected]
If you want to use the GDrive part of the example, follow this part on PyDrive2:
-
Create the application on your Google APIs Console and save the JSON in
client_secrets.json
-
Run the
tests.py
, the first time, a web page will open, accept the connection between the application you created and your Google Account ; a filecredentials.json
will be created, you will not need to log in next time.