EmailAttachmentDownloader
A Python script for checking emails and downloading attachments from specified senders using the imaplib and email libraries.
Install / Use
/learn @BenferhatAymen/EmailAttachmentDownloaderREADME
Email Attachment Downloader
This is a Python script that uses the imaplib and email modules to download email attachments from a specified email account.
Requirements
- Python 3.x
imaplibemail
Setup
- Install the required modules .
- Open the script in a text editor and set the
MAIL_ADDRESS,MAIL_PASSWORD, andimap_servervariables to the appropriate values for your email account. - Set the
mailListvariable to a dictionary where the keys are folder names and the values are lists of email addresses. Emails from addresses in these lists will have their attachments downloaded to the corresponding folder.
Usage
- Run the script by navigating to its directory in your terminal and running
python <script_name>.py. - The script will download attachments from emails in the specified email account and save them to folders named after the keys in the
mailListdictionary.
Notes
- The script currently only checks the most recent 3 emails in the inbox. You can change this by modifying the value of the
Nvariable in thecheck_mailfunction. - The script only downloads attachments from emails sent by addresses specified in the
mailListdictionary.
Related Skills
ai-cmo
Collection of my Agent Skills and books.
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
38PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
