mail2task
Extract actionable tasks from messy emails using Python.
Features
- Extract task-like sentences
- Detect due dates
- Detect priority levels
- Clean JSON output
- CLI support
Installation
pip install mail2task
Usage
Python
from mail2task import extract_tasks
email = """
Please submit the compliance report by Friday.
Schedule the onboarding meeting tomorrow.
"""
tasks = extract_tasks(email)
print(tasks)
CLI
Create a text file:
Please submit the report by Friday.
Schedule the client call tomorrow.
Run:
mail2task sample_email.txt
Output:
[
{
"title": "submit the report by Friday.",
"due_date": "2026-05-29T00:00:00",
"priority": "normal",
"confidence": 0.9
}
]
Pretty Output
mail2task sample_email.txt --pretty
Save Output
mail2task sample_email.txt --output tasks.json
Export Formats
JSON
mail2task sample_email.txt --format json
CSV
mail2task sample_email.txt --format csv
Markdown
mail2task sample_email.txt --format markdown
Example Use Cases
- Email automation
- Productivity apps
- AI assistants
- CRM workflows
- Task management systems
NLP Features
- Sentence splitting
- Greeting/signature filtering
- Due date extraction
- Priority detection
- Confidence scoring
NLP Engine
mail2task uses spaCy for:
- sentence segmentation
- tokenization
- action verb detection
- lightweight NLP parsing
.eml Email Support
mail2task can process raw email files directly.
mail2task sample_email.eml --pretty
Project Structure
mail2task/
├── src/
├── tests/
├── README.md
├── pyproject.toml
License
MIT License
Metadata
Release files for mail2task 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mail2task-0.7.0.tar.gz | 4.6 kB | Without provenance | Details for mail2task-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mail2task-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for mail2task-0.7.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / mail2task-0.7.0.tar.gz
| Download URL | mail2task-0.7.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5b6733f329a073df74663effa44bce1650ffbe52b511ee67a8c597aa77aad47
|
|
BLAKE2b-256 checksum How to use checksums |
451c01c3e06da08b024ff9ce107347fdc4321a7576550deec68a25bd43853111
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / mail2task-0.7.0-py3-none-any.whl
| Download URL | mail2task-0.7.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
425970c930df191e50f446e37de7a476e21a606aa8d9fc105253951f9b0f0dce
|
|
BLAKE2b-256 checksum How to use checksums |
03d026ea51bdcc5ae1a83e34d4b37c497148ed47d9d20b5ae5348003c3225cc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for mail2task 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.