Simple Email Gateway¶
A simple email gateway with IMAP/SMTP clients, connection pooling, and MCP server for AI assistant integration.
Note
This package provides both async and sync APIs. Async clients are recommended for async applications. Use sync wrapper clients (SyncIMAPClient, SyncSMTPClient) for simpler synchronous code.
Why Simple Email Gateway?
Async-first: Built on aioimaplib and aiosmtplib for modern async Python
Sync support: SyncIMAPClient and SyncSMTPClient wrappers for simpler synchronous usage
Production-ready: Connection pooling, rate limiting, audit logging
Security-focused: TLS 1.2+ minimum, CRLF injection prevention, recipient whitelisting
AI-ready: MCP server for seamless AI assistant integration
Well-tested: Comprehensive test suite with type checking
This project was built using an agentic workflow — for the full story, see Rationale.
Quick Links¶
Installation - Get started in minutes
Rationale - Why this project exists
Features¶
Async IMAP and SMTP clients (aioimaplib, aiosmtplib)
Connection pooling with automatic management
Token bucket rate limiting
Audit logging for security compliance
CRLF injection prevention
Recipient whitelist enforcement
TLS 1.2+ minimum encryption
MCP server for AI assistant integration
Getting Started