Mailor is a Discord-based email client that allows users to manage and interact with their email accounts directly inside Discord.
Instead of opening Gmail or Outlook, users can read emails, search messages, and render HTML emails as images using simple slash commands.
The system is designed to be fast, private, and fully interactive using Discord UI components.
Mailor connects to email providers using IMAP and transforms Discord into a lightweight email dashboard.
Each user can securely link their email accounts and:
- Access inbox messages
- Navigate emails with buttons
- Read content inside embeds
- Render HTML emails visually
- Search messages instantly
All interactions are private and tied to the user.
- Add email accounts using IMAP
- Store multiple accounts per user
- Remove accounts anytime
- Browse accounts interactively
- Fetch latest emails
- Limit number of results
- Filter unread messages
- Navigate with buttons:
- First
- Previous
- Next
- Last
- View subject, sender, and date
- Read plain-text content
- Automatic pagination for long emails
- Convert HTML emails into images
- Full-page rendering using Playwright
- Display result directly in Discord
- Search emails by subject keyword
- Interactive result navigation
- List all available folders
- Read emails from custom folders
- Total emails
- Unread count
- Read count
- Per-user data isolation
- Ephemeral responses only
- No shared data between users
Backend:
- Python 3
- discord.py
- asyncio
Email:
- imaplib
- email module (MIME parsing)
Rendering:
- Node.js
- Playwright (Chromium)
Storage:
- JSON database (accounts.json)
- User adds an email account using IMAP credentials
- Bot connects securely to the email server
- Emails are fetched and parsed
- Data is displayed using Discord embeds
- Navigation is handled with buttons
- HTML emails can be rendered into images using Playwright
Clone repository:
git clone https://github.com/gl1tch496/mailor.git cd mailor
Install Python dependencies:
pip install discord.py
Install rendering engine:
npm install playwright npx playwright install chromium
Create environment file:
.env
Add:
DISCORD_TOKEN=your_bot_token
python bot.py
Account:
/add imap_server email_account app_password
/accounts
/remove email_account
Inbox:
/inbox email_account [limit] [unread_only] [folder]
/read email_account position [folder]
/render email_account position [folder]
Utilities:
/folders email_account
/search email_account keyword [folder]
/stats email_account
/help
-
Add your email: /add imap.gmail.com example@gmail.com app_password
-
Open inbox: /inbox example@gmail.com
-
Navigate messages using buttons
-
Read email: /read example@gmail.com 1
-
Render HTML email: /render example@gmail.com 1
- Interactive buttons for navigation
- Dynamic embed updates
- User-restricted views
- Auto timeout after 5 minutes
HTML Email
→ Wrapped Template
→ Playwright Chromium
→ Screenshot
→ PNG sent to Discord
- Credentials stored locally
- No external APIs used
- Recommend app passwords instead of real passwords
- Users can only access their own data
- Requires IMAP-enabled accounts
- Playwright required for rendering
- Local JSON storage only
- No encryption yet
- Database integration
- OAuth login
- Attachment support
- Real-time notifications
- Web dashboard
MIT License
Mailor is designed for fast and private email management directly inside Discord