Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
makamto authored Jun 7, 2024
1 parent bc73c4b commit 13d93d1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

0 comments on commit 13d93d1

Please sign in to comment.