Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mail → Discord Notifier

A simple Python script that monitors multiple mailboxes (or one) via IMAP and sends you instant Discord notifications for new incoming emails.

Each email notification includes:

  • 📧 Sender address
  • 📨 Subject
  • 🧾 Body text (plain or extracted from HTML)
  • 📎 Attachment filenames

Features

  • Supports multiple email accounts
  • Separate Discord webhook or bot channel per account
  • Uses SQLite to remember seen emails (no duplicates)
  • Automatically polls every few seconds (configurable)
  • Lightweight & runs 24/7 in Docker

Notes

  • All configuration is handled via the ACCOUNTS JSON inside docker-compose.yml.

Discord Setup

Easiest method (recommended):

Use a Discord Webhook for each channel.

  1. In Discord Server → Channel Settings → Integrations → Webhooks
  2. Click New Webhook → Copy Webhook URL
  3. Paste that URL in your account configuration under discord_webhook.

Alternatively, you can use a bot token + channel ID if you prefer.

Discord Bot (idk why u may need this)

Honestly, webhook is easier and faster, but you can use a bot token + channel ID if you prefer.


Setup

  1. Clone the repo and edit docker-compose.yml for credential and webhook link.
  2. Run sudo docker compose up -d --build and it should start looking for incoming emails.

Example

Example

About

This checks for incoming email every 30 seconds, if there is any unseen mail this will send the mail to your discord server like a notification. Well, you don't have to open your mail every time. 🤣

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages