From 13d93d19473a9dbda723e147ea06016eb4880197 Mon Sep 17 00:00:00 2001 From: vma <143389271+makamto@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:40:22 +0800 Subject: [PATCH] Update README.md --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12adcba..bde551b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ ============================= **Description** + This Python script connects to an email server using IMAP, searches for emails with a specific subject, and downloads attachments of a specified type to a local directory. **Configuration** + Before running the script, you need to configure the following variables at the top of the script: * `HOST`: The hostname of your email server. @@ -16,13 +18,20 @@ Before running the script, you need to configure the following variables at the * `ATTACHMENT_TYPE`: The file extension of the attachments to download (e.g. "xlsx"). * `SAVE_DIR`: The directory where attachments will be saved. +**Important** + +Before running the script, make sure to: + +* Enable IMAP access in your email account settings. This is usually found in the account settings or security settings of your email provider. +* Update the configuration variables at the top of the script. + + **Usage** + 1. Update the configuration variables at the top of the script. 2. Run the script using Python (e.g. `python email_attachment_downloader.py`). 3. The script will connect to the email server, search for emails with the specified subject, and download attachments of the specified type to the specified directory. **Note** -This script uses the `imaplib` and `email` libraries to connect to the email server and parse email messages. It also uses the `openpyxl` library to handle Excel file attachments. Make sure you have these libraries installed before running the script. -**Troubleshooting** -If you encounter any issues while running the script, check the error messages for more information. You can also try debugging the script by adding print statements or using a Python debugger. +This script uses the `imaplib` and `email` libraries to connect to the email server and parse email messages. It also uses the `openpyxl` library to handle Excel file attachments. Make sure you have these libraries installed before running the script.