π¬ Telegram Email Notifier - Automatically sends Gmail emails to Telegram with rich formatting and inline buttons. Personal project with MIT license.
MailBotX is a Telegram bot that automatically sends new Gmail emails as notifications directly to your Telegram chat.
Itβs a personal project, designed for learning and automation purposes.
- Sends unread Gmail emails to Telegram
- HTML formatted messages with preview and timestamp
- Inline button linking to Gmail
- Commands:
/start,/stop,/status,/last,/stats,/test,/menu - Logs statistics and last email in JSON files
- Checks Gmail every 10 minutes
MailBotX-src/
β ββ main.py <- Starts the Telegram bot and Gmail checking loop
β ββ telegram_bot.py <- Handles Telegram commands and messaging
β ββ gmail_service.py <- Connects to Gmail, checks emails, sends notifications
β ββ config.py <- Loads configuration and tokens from .env
β ββ .env <- Stores BOT_TOKEN, CHAT_ID, EMAIL_ADDRESS, EMAIL_PASSWORD
β ββ bot_status.json <- Stores bot status
β ββ stats.json <- Stores email statistics
β ββ last_email.json <- Stores last email
MailBotX-tests/
β βββ test_api_contract.py <- Contract test
β βββ test_e2e.py <- End to End tests
β βββ test_negative.py <- Negative tests
β βββ test_regression.py <- Regression tests
β βββ test_unit.py <- Unit tests
β βββ screenshots/
β βββ Screenshot-1-Unit-Tests.png
β βββ Screenshot-2-Test-API-Contract.png
β βββ Screenshot-3-Test-Negative.png
β βββ Screenshot-4-Test-Regression.png
β βββ Screenshot-5-Test-E2E.png
ββ docs/ <- Documentation folder
β ββ index.md <- Landing page
β ββ installation.md <- Installation guide
β ββ usage.md <- How to use the bot
β ββ env.md <- .env setup guide
β ββ screenshots/ <- Screenshots and GIFs
β
βββ README.md
See full instructions in the Installation guide in the Docs folder.
Check the Usage guide for commands and instructions to run the bot.
All Markdown files with GIF are available as a landing page:
- Never upload
.envwith your credentials to GitHub. - Use
.env.examplewith placeholder values.
MIT License β free to use, but always credit the author.

