Browser extension for delaying and editing Gmail messages
A browser extension that allows you to delay sending Gmail messages and edit them before they're actually sent. Similar to Boomerang but with longer delay periods and custom functionality.
- ⏰ Delay Email Sending: Choose from preset delays (15 minutes to 1 day) or set custom delays
- ✏️ Edit Queued Emails: Modify subject, body, or delay time before sending
- ❌ Cancel Queued Emails: Stop emails from being sent
- 🔄 Queue Management: View all queued emails in the extension popup
- 🔔 Notifications: Get notified when emails are queued or sent
This extension uses a hybrid approach:
- Browser Extension (JavaScript): Integrates with Gmail to intercept sends
- Python Backend (FastAPI): Manages email queue and handles actual sending via Gmail API
git clone https://github.com/yourusername/gmail-delay-extension.git
cd gmail-delay-extensioncd backend
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
extensionfolder from this project - The extension should now appear in your extensions list
Note: The current version stores emails but doesn't actually send them via Gmail API yet. This will be added in a future update.
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Gmail API
- Create credentials (OAuth 2.0)
- Download credentials and place in
backend/folder
-
Start the Python backend:
cd backend python main.pyThe server will run on
http://localhost:8000 -
Open Gmail in your browser where the extension is installed
- Compose an email in Gmail as normal
- Click "Send" - the extension will intercept this
- Choose delay time from the popup modal
- Click "Queue Email" to schedule it
- Manage queued emails by clicking the extension icon
- Click the extension icon to see all queued emails
- Edit: Modify subject, body, or delay time
- Cancel: Stop the email from being sent
- Refresh: Update the list of queued emails
gmail-delay-extension/
├── extension/ # Browser extension files
│ ├── manifest.json # Extension configuration
│ ├── content.js # Gmail integration script
│ ├── background.js # Background processes
│ ├── popup.html # Extension popup interface
│ ├── popup.js # Popup functionality
│ └── styles.css # Extension styles
├── backend/ # Python backend
│ ├── main.py # FastAPI server
│ ├── requirements.txt # Python dependencies
│ └── emails.db # SQLite database (created automatically)
└── README.md # This file
The Python backend provides these REST API endpoints:
GET /- Health checkPOST /queue-email- Queue a new emailGET /queued-emails/{user_email}- Get user's queued emailsPUT /email/{email_id}- Update a queued emailDELETE /email/{email_id}- Cancel a queued email
The extension uses:
- Manifest V3 for Chrome extensions
- Content Scripts to interact with Gmail's DOM
- Background Scripts for persistent functionality
- Popup Interface for email management
The backend uses:
- FastAPI for the REST API
- SQLite for data storage
- APScheduler for email scheduling
- Pydantic for data validation
-
Test the backend:
cd backend python main.py # Visit http://localhost:8000 to see API docs
-
Test the extension:
- Load the extension in Chrome
- Open Gmail and try composing an email
- Check the browser console for any errors
-
Extension not working:
- Check that the backend server is running on localhost:8000
- Look for errors in browser console (F12)
- Ensure extension has proper permissions
-
Server connection errors:
- Verify Python dependencies are installed
- Check that port 8000 is available
- Look at server logs for error messages
-
Gmail integration issues:
- Gmail's interface changes frequently
- Check if content.js selectors need updating
- Try refreshing the Gmail page
To see detailed logs:
- Open browser console (F12) when using Gmail
- Check the background script logs in
chrome://extensions/ - Monitor server logs in the terminal
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Gmail API integration for actual email sending
- Recurring email scheduling
- Email templates
- Better user authentication
- Mobile app version
- Integration with other email providers
This project is open source. Feel free to use, modify, and distribute.
If you encounter issues:
- Check the troubleshooting section above
- Look for existing issues in the GitHub repository
- Create a new issue with detailed information about your problem
Note: This extension is for educational purposes. Use responsibly and ensure compliance with your organization's email policies.