{"id":30175283,"url":"https://github.com/bugswriter/mailbot-ai","last_synced_at":"2025-08-12T01:30:10.050Z","repository":{"id":297335862,"uuid":"996418421","full_name":"Bugswriter/mailbot-ai","owner":"Bugswriter","description":"Smart AI based email classifier","archived":false,"fork":false,"pushed_at":"2025-07-10T21:36:14.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-11T03:36:00.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bugswriter.com/mailbot-ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bugswriter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T23:33:49.000Z","updated_at":"2025-07-10T21:36:17.000Z","dependencies_parsed_at":"2025-06-05T05:08:05.916Z","dependency_job_id":"58c94718-15d2-4558-90e6-6c81215e34f1","html_url":"https://github.com/Bugswriter/mailbot-ai","commit_stats":null,"previous_names":["bugswriter/mailbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bugswriter/mailbot-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Fmailbot-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Fmailbot-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Fmailbot-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Fmailbot-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bugswriter","download_url":"https://codeload.github.com/Bugswriter/mailbot-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Fmailbot-ai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269985700,"owners_count":24508121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-12T01:30:05.443Z","updated_at":"2025-08-12T01:30:10.031Z","avatar_url":"https://github.com/Bugswriter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📬 mailbot ai\n\n`mailbot-ai` is a Python-based email automation bot that connects to your inbox via IMAP, reads unread messages, and uses **Gemini AI** to intelligently classify and summarize them.\n\n---\n\n## ⚙️ Requirements\n\n- Python 3.8+\n- A `.env` file with your credentials and Gemini API key\n\n---\n\n## 📦 Setup\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/Bugswriter/mailbot.git\n   cd mailbot\n    ````\n\n2. **Create a virtual environment and activate it:**\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # For Linux/macOS\n   ```\n\n3. **Install dependencies:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Create a `.env` file in the root directory:**\n\n   ```env\n   EMAIL_USERNAME=your_email@example.com\n   EMAIL_PASSWORD=your_email_password_or_app_password\n   IMAP_SERVER=imap.your-email-provider.com\n   GEMINI_API_KEY=your_gemini_api_key\n   ```\n\n---\n\n## 🤖 Features\n\n* Connects to your inbox via IMAP\n* Uses **Gemini AI** to:\n\n  * Classify emails into types like Work, Personal, Spam, etc.\n  * Optionally summarize the content\n* Fully customizable prompt (see `prompt_template.py`)\n\n\u003e ✏️ You can modify the AI prompt logic in `prompt_template.py` to change classification behavior or format.\n\n---\n\n## 🚀 Usage\n\n```bash\npython main.py\n```\n\n---\n\n## 🛠️ Optional: Run as a systemd Service\n\nTo keep the bot running in the background:\n\n```ini\n# /etc/systemd/system/mailbot.service\n[Unit]\nDescription=MailBot - AI Email Classifier\nAfter=network.target\n\n[Service]\nUser=your_username\nWorkingDirectory=/path/to/mailbot\nExecStart=/path/to/mailbot/venv/bin/python /path/to/mailbot/main.py\nRestart=always\nEnvironment=\"EMAIL_USERNAME=your_email\"\nEnvironment=\"EMAIL_PASSWORD=your_password\"\nEnvironment=\"IMAP_SERVER=imap.server\"\nEnvironment=\"GEMINI_API_KEY=your_key\"\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\nsudo systemctl daemon-reexec\nsudo systemctl enable --now mailbot.service\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the **GNU General Public License v3.0**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugswriter%2Fmailbot-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugswriter%2Fmailbot-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugswriter%2Fmailbot-ai/lists"}