A beautiful web application to parse, organize, and manage your Gmail inbox
Features • Demo • Installation • Usage • Contributing
Gmail Mail Parser is a powerful yet easy-to-use web application that connects to your Gmail account and helps you:
- Visualize your inbox with beautiful statistics
- Organize emails by grouping them by sender
- Clean up your inbox by finding and using unsubscribe links
All processing happens locally on your computer - your emails never leave your machine!
| Feature | Description |
|---|---|
| 📊 Dashboard | Get a bird's-eye view of your inbox with stats on total emails, unique senders, and categories |
| 👥 Group by Sender | See all emails organized by who sent them, with search and filter capabilities |
| 🚫 Unsubscribe Manager | Automatically detects unsubscribe links in promotional emails for easy cleanup |
| 🔐 Secure OAuth2 | Uses Google's official OAuth2 - we never see or store your password |
| 🌙 Modern Dark UI | Beautiful glassmorphism design with smooth animations |
| 📱 Responsive | Works great on desktop, tablet, and mobile devices |
The sleek landing page with feature highlights and secure sign-in.
Overview of your inbox with category breakdown and top senders.
All your emails grouped by sender with filtering options.
Find and manage promotional subscriptions easily.
- Python 3.8 or higher
- A Gmail account
- Google Cloud project with Gmail API enabled
-
Clone the repository
git clone https://github.com/D3S-Gaurav/Mail_parser.git cd Mail_parser -
Create a virtual environment
python -m venv .venv # Windows .venv\Scripts\activate # Mac/Linux source .venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up Google Cloud credentials
- See SETUP.md for detailed instructions
- Place your
credentials.jsonin the project root
-
Run the application
python app.py
-
Open in browser
http://localhost:5000
Mail_parser/
├── 📄 app.py # Main Flask web application
├── 📄 gmail_parser.py # CLI version (standalone)
├── 📄 requirements.txt # Python dependencies
├── 📄 SETUP.md # Detailed setup guide
├── 📄 README.md # This file
├── 📁 templates/ # HTML templates
│ ├── base.html # Base template with navigation
│ ├── index.html # Landing page
│ ├── dashboard.html # Email statistics dashboard
│ ├── senders.html # Emails grouped by sender
│ └── unsubscribe.html # Unsubscribe manager
└── 📁 static/ # Static assets
├── 📁 css/
│ └── style.css # Modern dark theme styles
└── 📁 js/
└── main.js # JavaScript utilities
python app.pyThen open http://localhost:5000 in your browser.
For a simpler CLI experience:
python gmail_parser.pyThis will fetch emails and save them to the parsed_emails/ folder as JSON and CSV files.
| Aspect | Details |
|---|---|
| Authentication | OAuth2 via Google - we never see your password |
| Data Storage | All emails processed locally, nothing sent to external servers |
| Permissions | Read-only access to emails (gmail.readonly scope) |
| Credentials | Your credentials.json and tokens are excluded from git |
- Backend: Python 3, Flask
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- API: Gmail API via Google Cloud
- Authentication: OAuth 2.0
- Design: Custom CSS with glassmorphism effects
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Landing page |
/login |
GET | Initiate OAuth2 login |
/oauth2callback |
GET | OAuth2 callback handler |
/logout |
GET | Clear session and logout |
/dashboard |
GET | Main dashboard view |
/senders |
GET | Emails grouped by sender |
/unsubscribe |
GET | Unsubscribe manager |
/api/emails |
GET | Fetch emails JSON data |
/api/sender/<email> |
GET | Get emails from specific sender |
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gmail API for email access
- Flask for the web framework
- Inter Font for beautiful typography
⭐ Star this repo if you find it useful!
Made with ❤️ by D3S-Gaurav