Skip to main content

Simple tool for downloading email attachments for all emails in a given folder using an IMAP client.

Install:

$ pip install attachment-downloader

Usage:

Usage: attachment-downloader [options]

Options:
  -h, --help            show this help message and exit
  --host=HOST           IMAP Host
  --username=USERNAME   IMAP Username
  --password=PASSWORD   IMAP Password
  --imap-folder=IMAP_FOLDER
                        IMAP Folder to extract attachments from
  --subject-regex=SUBJECT_REGEX
                        Regex that the subject must match against
  --date-after=DATE_AFTER
                        Select messages after this date
  --date-before=DATE_BEFORE
                        Select messages before this date
  --filename-template=FILENAME_TEMPLATE
                        Attachment filename (jinja2) template.
  --output=DOWNLOAD_FOLDER
                        Output directory for attachment download
  --delete              Delete downloaded emails from Mailbox
  --delete-copy-folder=DELETE_COPY_FOLDER
                        IMAP folder to copy emails to before deleting them

Example:

$ attachment-downloader --host imap.example.com --username mail@example.com --password pa55word \\
    --imap-folder invoices --output ~/Downloads

For full instructions and documentation visit: https://github.com/jamesridgway/attachment-downloader

Release files for attachment-downloader 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for attachment-downloader 1.3.0
File Size Uploaded
attachment_downloader-1.3.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for attachment-downloader 1.3.0
File Interpreter ABI Platform
attachment_downloader-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / attachment_downloader-1.3.0.tar.gz

Download URL attachment_downloader-1.3.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
49b9621affb32df2289f9072374e28f3325156b012a02fb2e56c310d5adec937
BLAKE2b-256 checksum
How to use checksums
e749152d70575d11c3572f635fcb800ed761236f1b6244b089d90070223687d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / attachment_downloader-1.3.0-py3-none-any.whl

Download URL attachment_downloader-1.3.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d40099b32a1a82871712b59afecc217b370ebf9dd8da847b6af0a1f1c08d3e93
BLAKE2b-256 checksum
How to use checksums
e26b116b789bfe5b68b0e8ee0f105f2f637c6f55305fc3ab9df6457bd358ee5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page