Skip to main content

A CLI tool to extract attachments from .eml files (email messages saved as files)

Project description

EML Extractor

EML Extractor is a CLI tool to extract attachments from .eml files (email messages saved as files).

Features

  • Find .eml files (recursively or not) in a selected folder;
  • Select individuals .eml files to extraction;
  • Save all attachments in a single main folder;
  • Organize the attachments by email subject subfolder.

Requirements

Python 3.6+

Installation

$ pip install eml-extractor

Usage

By default, the current working directory is used as the source for .eml files as well as destination for extracted attachments. You can set different optional arguments to change this behavior:

usage: eml-extractor [OPTIONS]

Extracts attachments from .eml files

optional arguments:
  -h, --help            show this help message and exit
  -s PATH, --source PATH
                        the directory containing the .eml files to extract
                        attachments (default: current working directory)
  -r, --recursive       allow recursive search for .eml files under SOURCE
                        directory
  -f FILE [FILE ...], --files FILE [FILE ...]
                        specify an .eml file or a list of .eml files to extract
                        attachments
  -d PATH, --destination PATH
                        the directory to extract attachments to (default:
                        current working directory)

Examples

1. Find all .eml files in current working dir, extract the attachments and save them in the same dir:

$ eml-extractor

The command above is equivalent to:

$ eml-extractor --source . --destination .

2. Set another path for searching .eml files:

$ eml-extractor --source /path/to/eml/files/

3. Allow recursive searching:

$ eml-extractor --source /path/to/eml/files/ --recursive

4. Define manually from which files the attachments will be extracted:

$ eml-extractor --files /path/to/file1.eml /path/to/file2.eml

5. Change the path where to save the extracted attachments:

$ eml-extractor --destination /path/to/extracted/attachments/

License

This project is licensed under the terms of the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eml-extractor-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

eml_extractor-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file eml-extractor-0.1.1.tar.gz.

File metadata

  • Download URL: eml-extractor-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

File hashes

Hashes for eml-extractor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2d17f15e920d788a3d28ae682c4f08b61e8f6aa9bff74078b668e176ea4d1745
MD5 2e34b56c3f6760b73b089bb4fda35e20
BLAKE2b-256 c777b1e6d86dbdb1efdaecf22e22852eab8f3d00af958f6b4b7d4e6f55fc5d62

See more details on using hashes here.

File details

Details for the file eml_extractor-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: eml_extractor-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

File hashes

Hashes for eml_extractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c42ca13b77776ab40fa25a1d17a8ec5a623cd95ed915eccf1bd283482513e189
MD5 3745a5c5112da3eb6bd6c16fc7ab3fd7
BLAKE2b-256 cc434538c4296b37665bf948600a548a38ab0afd7934e0977f6b0c7d7c0f1a1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page