Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A simple SMTP server for receiving emails with REST API access
A simple SMTP server for receiving emails with REST API access. Perfect for testing, development, and automation scenarios where you need to receive emails programmatically.
# Install with pip
pip install aemail
# Or install with Poetry
poetry add aemail
# Start the server with default settings
aemail-server
# Start with custom ports
aemail-server --smtp-port 2525 --rest-port 8080
# Start with persistent database
aemail-server --db-file emails.db
# Start with custom config
aemail-server --config my-config.ini
To receive emails for your domain, configure DNS records:
Point your mail subdomain to your server IP:
A mx YOUR.SERVER.IP.ADDRESS
Configure MX record to route emails to your server:
MX * mx.yourdomain.com
The
*wildcard means ALL subdomains will be routed to your server. Examples:test@yourdomain.com,anything@sub.yourdomain.comThis gives you unlimited email addresses!
The server provides a REST API for accessing received emails:
Get all stored messages (last 100)
curl http://localhost:14000/all
Get messages from a specific sender
curl http://localhost:14000/from/sender@example.com
Get messages to a specific recipient
curl http://localhost:14000/to/recipient@example.com
Health check endpoint
curl http://localhost:14000/health
[
{
"from": "sender@example.com",
"to": ["recipient@example.com"],
"to0": "recipient@example.com",
"subject": "Test Email",
"content": "Email content here...",
"time": "2024-01-01T12:00:00"
}
]
[smtpd]
host = :: # Listen on all interfaces (IPv4 and IPv6)
port = 25
[rest]
port = 14000
Override config file settings with environment variables:
SMTP_HOST - SMTP server host (default: :: - all interfaces)SMTP_PORT - SMTP server port (default: 25)REST_PORT - REST API port (default: 14000)aemail-server --help
Options:
--config, -c Path to configuration file
--smtp-host SMTP server host
--smtp-port SMTP server port
--rest-port REST API port
--db-file SQLite database file path
--verbose, -v Enable verbose logging
--version Show version
# Clone the repository
git clone https://github.com/lycying/aemail.git
cd aemail
# Install Poetry (if not already installed)
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
# Run the server
poetry run aemail-server
# Run tests
poetry run pytest
# Build wheel package
poetry build
aemail/
├── crazy_email_recv_srv/ # Main package
│ ├── __init__.py
│ ├── cli.py # Command line interface
│ ├── config.py # Configuration management
│ ├── data.py # Data access layer
│ ├── email_handler.py # SMTP email processing
│ ├── server.py # Main server
│ ├── utils.py # Utility functions
│ └── web_api.py # REST API
├── tests/ # Test suite
├── static/ # Web interface files
├── pyproject.toml # Poetry configuration
└── README.md
Send a test email to any address at your domain:
# Example: Send email to test@yourdomain.com
# Then query the API:
curl http://localhost:14000/to/test@yourdomain.com
Or use the web interface at: http://localhost:14000
MIT License - see LICENSE file for details.
Note: This tool is for testing and development purposes. Use responsibly and in compliance with applicable laws and regulations.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.3 | 27 Jul 2025 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0c61f21953c4605a5cb91577781e4a4eeeef2fee374ad53cdc05cf8a35d8af22