Simple email to discord python bridge.
235
GitHub Repository: github.com/real-general-iroh/mailcord
Mailcord is a lightweight Python application designed to forward emails from your IMAP inbox to Discord as rich embeds. It integrates seamlessly with services like Cloudflare Email Routing and is configurable via environment variables, making it easy to deploy with Docker or Docker Compose.
ERROR, WARNING, INFO, DEBUG, VERBOSE).

| Variable | Description | Required | Default |
|---|---|---|---|
IMAP_SERVER | IMAP server address (e.g., imap.gmail.com). | Yes | |
IMAP_USER | IMAP username/email. | Yes | |
IMAP_PASS | IMAP password or app-specific password. | Yes | |
DISCORD_BOT_TOKEN | Discord bot token. | Yes | |
MAINTAINER_ID | Discord user ID for troubleshooting notes. | Yes | |
CATCH_ALL_USER_ID | Default Discord user ID for unmatched emails. | No | MAINTAINER_ID |
USER_MAP_* | Maps email addresses to Discord IDs (USER_MAP_user=email:discord_id). | No | |
LOG_LEVEL | Logging verbosity (ERROR, WARNING, INFO, DEBUG, VERBOSE). | No | INFO |
POLL_INTERVAL | Interval (in seconds) to poll for new emails. | No | 60 |
.env FileIMAP_SERVER=imap.gmail.com
[email protected]
IMAP_PASS=your-app-password
DISCORD_BOT_TOKEN=12345678901234567890
MAINTAINER_ID=12345678901234567890
CATCH_ALL_USER_ID=12345678901234567890
[email protected]:12345678901234567890
LOG_LEVEL=INFO
POLL_INTERVAL=60
services:
mailcord:
restart: unless-stopped
image: realgeneraliroh/mailcord:latest
container_name: mailcord
environment:
- POLL_INTERVAL=60
- IMAP_SERVER=imap.gmail.com
- [email protected]
- IMAP_PASS=your-app-password
- DISCORD_BOT_TOKEN=12345678901234567890
- MAINTAINER_ID=12345678901234567890
- CATCH_ALL_USER_ID=12345678901234567890
- LOG_LEVEL=INFO
- [email protected]:12345678901234567890
Run:
docker-compose up -d
docker run -d --env-file .env realgeneraliroh/mailcord:latest
MAINTAINER_ID is required for troubleshooting notes in embeds.Content type
Image
Digest
sha256:d62ed8480…
Size
45.4 MB
Last updated
almost 2 years ago
docker pull realgeneraliroh/mailcord