EmailManager is a modern web application for managing and automatically classifying your emails. It uses the Google Gemini API to intelligently analyze and categorize your emails.
-
🔐 Secure Authentication
- User registration and login
- Route protection with authentication
- Secure session management
-
📥 Simplified IMAP Setup
- Gmail IMAP support
- One-step configuration
- Automatic connection testing
-
🤖 Smart Email Management
- Automatic category classification
- Content analysis with Google Gemini
- Important email detection
-
✉️ Email Actions
- Mark as read/unread
- Delete emails
- Mark senders as promotional
-
🎨 Modern Interface
- Responsive design
- Dark/light theme
- Real-time notifications
- Python 3.8 or higher
- A Gmail account with two-factor authentication enabled
- A modern web browser
- A Google Gemini API key (optional)
-
Clone the repository
git clone https://github.com/your-username/emailmanager.git cd emailmanager -
Create a virtual environment
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # Edit .env with your settings -
Run the application
flask run
-
Enable two-factor authentication
- Go to Google Account Security
- Enable two-factor authentication
-
Create an application password
- In Google security settings
- Go to "App passwords"
- Select "Other (Custom name)"
- Name it "EmailManager"
- Copy the generated password
-
Configure the application
- Log in to EmailManager
- Go to settings
- Enter your Gmail address
- Paste the application password
- The default IMAP server is
imap.gmail.com
- 🔑 Password hashing with Werkzeug
- 🛡️ Built-in CSRF protection
- 🔐 Secure session management
- 🔒 Secure API key storage
- 🚫 SQL injection protection
emailmanager/
├── app.py # Application entry point
├── src/
│ ├── auth.py # Authentication management
│ ├── mails.py # Email handling
│ ├── agent.py # Artificial intelligence
│ └── db.py # Database management
├── frontend/
│ ├── static/
│ │ ├── css/ # CSS styles
│ │ └── js/ # JavaScript scripts
│ └── templates/ # HTML templates
└── requirements.txt # Python dependencies
The application uses SQLite with two main tables:
-
users: User information storage
- id, username, password, email, imap_password, imap_server, gemini_api_key
-
mails: Email storage
- id, user_id, subject, sender, date, content, category, is_read, is_pub
Contributions are welcome! Here's how to contribute:
- Fork the project
- Create a 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
For any questions or issues:
- Open an issue on GitHub
- Contact the development team
- Check the documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask - Lightweight web framework
- Google Gemini - AI API
- Font Awesome - Icons
- The open source community
Made with ❤️ by a student developer
