Skip to content

KristiyanGeorgiev1996/MailBotX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

85 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MailBotX

πŸ“¬ Telegram Email Notifier - Automatically sends Gmail emails to Telegram with rich formatting and inline buttons. Personal project with MIT license.

Bot Screenshot

MailBotX Docs / GitHub Pages

Python Telegram License Stars

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.


πŸ“Œ Features

  • 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

Bot Demo


πŸ“ Project Structure

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

βš™οΈ Installation

See full instructions in the Installation guide in the Docs folder.


πŸ’» Usage

Check the Usage guide for commands and instructions to run the bot.


πŸ”— Documentation / GitHub Pages

All Markdown files with GIF are available as a landing page:

MailBotX Docs / GitHub Pages


⚠️ Security

  • Never upload .env with your credentials to GitHub.
  • Use .env.example with placeholder values.

πŸ“œ License

MIT License – free to use, but always credit the author.

About

πŸ“¬ Telegram Email Notifier - Automatically sends Gmail emails to Telegram with rich formatting and inline buttons. Personal project with MIT license.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages