An intelligent tool that helps you reclaim your inbox by automatically unsubscribing from unwanted email subscriptions in Gmail.
- Smart Gmail Integration: Secure connection using OAuth2
- Intelligent Processing:
- Finds hidden unsubscribe links in email headers and body
- Groups emails by sender to avoid duplicate unsubscribes
- Handles both one-click and form-based unsubscribe pages
- Progress Tracking:
- Real-time console updates
- Detailed logging of all actions
- CSV export of results
- Safety First:
- Rate limiting to avoid Gmail API restrictions
- Automatic retry on failed attempts
- Backup of all processed links
- Set Up Your Environment
git clone https://github.com/rahulsamant37/Email-Auto_UnSubscriber.git
cd email-auto-unsubscriber
pip install -r requirements.txt
- Configure Credentials
- Create a
.env
file in the project root - Add your Gmail credentials:
EMAIL="your.email@gmail.com"
PASSWORD="your-app-password"
- Run the Tool
python main.py
- Python 3.8+
- Gmail account
- Gmail App Password (for 2FA-enabled accounts)
- Required packages listed in
requirements.txt
This tool requires a Gmail App Password. Never use your regular Gmail password!
To set up an App Password:
- Go to Google Account Security
- Enable 2-Step Verification
- Generate an App Password at App Passwords
The tool generates two key files:
File | Description |
---|---|
unsubscribe_links.txt |
Complete list of discovered unsubscribe links |
unsubscribe_services.csv |
Structured data with sender info and results |
Watch your unsubscribe progress in real-time:
✓ Connected to Gmail
📧 Found 150 subscription emails
🔍 Identified 45 unique services
⚡ Processing unsubscribe requests...
[====================] 100% Complete
✅ Successfully unsubscribed: 42
❌ Failed attempts: 3
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for personal use only. Ensure you have proper authorization to access the Gmail account you're using. The developers are not responsible for any misuse or violations of terms of service.
Common issues and solutions:
- API Rate Limits: The tool automatically handles Gmail API quotas
- Connection Issues: Check your App Password and internet connection
- Unsubscribe Failures: Some services may require manual unsubscription
For more help, check our Issues page.