This project is configured for local development ONLY. It is NOT intended for cloud deployment.
- Python 3.8+
- Gmail account with App Password enabled
pip install -r requirements.txt- Go to Google App Passwords
- Sign in with your Gmail account
- Create a new App Password:
- Select app: Mail
- Select device: Windows Computer (or your OS)
- Click Generate
- Copy the 16-character password (e.g.,
xxxx xxxx xxxx xxxx)
Copy the example file:
copy .env.example .envEdit .env and add your credentials:
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-16-char-app-password
SENDER_EMAIL=your-email@gmail.com
SENDER_NAME=Your Name
python manage.py migratepython manage.py createsuperuserpython manage.py runserverVisit: http://localhost:8000
- Email Backend: Django SMTP
- SMTP Host: smtp.gmail.com
- SMTP Port: 587 (TLS)
- Database: SQLite (
db.sqlite3) - Debug Mode: Enabled
Gmail free accounts have sending limits:
- 500 emails per day
- ~1 email per second recommended
The app includes a 1-second delay between emails by default.
-
Check App Password:
- You MUST use an App Password, not your regular Gmail password
- Generate at: https://myaccount.google.com/apppasswords
-
Check
.envFile:- Ensure no spaces in the password
- No quotes around values
-
Check Gmail Security:
- 2-Factor Authentication must be enabled to create App Passwords
-
Test SMTP Connection:
- Visit:
http://localhost:8000/debug-smtp/ - Click "Run SMTP Test"
- Check error details
- Visit:
| Error | Solution |
|---|---|
Authentication failed |
Wrong App Password - regenerate it |
Connection timeout |
Check your firewall/antivirus |
SMTP_USER not defined |
Add credentials to .env file |
bulk_email_dashboard/
├── emails/ # Main app
│ ├── models.py # Campaign, Email models
│ ├── views.py # Dashboard, campaign views
│ ├── utils.py # Email sending logic
│ └── templates/ # HTML templates
├── bulk_email_dashboard/
│ ├── settings.py # Django settings (local only)
│ └── urls.py
├── db.sqlite3 # SQLite database (local)
├── .env # Your secrets (DO NOT COMMIT)
├── .env.example # Template for .env
└── requirements.txt # Python dependencies
✅ Bulk email campaigns ✅ CSV/Excel recipient import ✅ Email personalization (merge tags) ✅ Campaign analytics ✅ Real-time sending status ✅ SMTP diagnostics page
- Never commit
.envto Git - Use App Passwords, not your real Gmail password
- Keep
SECRET_KEYprivate - This is for local use ONLY - do not expose to the internet
- Check the SMTP Debug page:
/debug-smtp/ - Review Django logs in the terminal
- Verify your Gmail App Password