A modern, feature-rich bulk email campaign management application built with Python and Tkinter.
python main.py # New modular version (recommended)
# OR
python sender.py # Original version (still works!)- βοΈ Professional Email Sending - Send personalized HTML emails with embedded images and QR codes
- π¨ Ultra-Modern UI - Dark theme with vibrant accents and smooth animations
- π Campaign Management - Import recipients from CSV/TXT, track sending progress
- π Persistent Login - Save SMTP credentials securely for quick reconnection
- ποΈ Live Preview - Real-time preview of email content before sending
- πΌοΈ Image Attachments - Upload and embed images directly in emails
- π± QR Code Support - Dynamically attach QR codes per recipient from CSV
- βοΈ Flexible Configuration - Easy SMTP server configuration with test connection
- π Default Template - Professional HTML email template with CSS included
- π Organized Structure - Clean folder organization for config, data, and templates
Email_sender/
β
βββ app/ # Application source code
β βββ config.py # ConfigManager for SMTP settings
β βββ email_sender.py # EmailSender business logic
β βββ html_parser.py # HTMLTextExtractor for preview
β β
β βββ ui/ # UI components
β βββ styles.py # Centralized styling
β βββ tab_base.py # Reusable tab structure
β βββ main_window.py # Main app window
β βββ smtp_tab.py # SMTP configuration tab
β βββ recipients_tab.py # Recipients management
β βββ compose_tab.py # Email composition
β βββ send_tab.py # Campaign sending
β βββ connection_dialog.py # Connection popup
β
βββ config/ # β Configuration files
β βββ smtp_config.json # SMTP credentials (auto-created)
β
βββ data/ # β Data files
β βββ data.csv # Sample recipient data
β βββ sample_with_qr.csv # Sample with QR codes
β
βββ templates/ # β Email templates
β βββ default_template.html # Professional HTML template
β βββ styles.css # Email styling (auto-loaded)
β
βββ main.py # π― NEW entry point
βββ sender.py # Legacy version (still works)
βββ README.md # This file
βββ QUICKSTART.md # Quick start guide
βββ ORGANIZATION.md # File organization guide
βββ ARCHITECTURE.md # Architecture docs
NEW: All files are now properly organized:
- config/ - SMTP settings and configuration
- data/ - CSV files and QR code images
- templates/ - HTML email templates with CSS
See ORGANIZATION.md for detailed file organization guide.
- Python 3.8 or higher
- pip (Python package manager)
- Clone or download this repository
- Install required packages:
pip install -r requirement.txtNote: tkinter is included with most Python installations. If you encounter issues, install it via:
- Windows: Included by default
- macOS: Included by default
- Linux:
sudo apt-get install python3-tk
Run the main entry point:
python main.pyOr run the original sender (if preferred):
python sender.py-
Connect to SMTP Server
- Click the "π Connect SMTP" button in the top toolbar
- Enter your email server credentials:
- Server: smtp.gmail.com (for Gmail)
- Port: 587 (TLS) or 465 (SSL)
- Email: your email address
- Password: your app password
- Click "Connect" to establish connection
- Credentials are saved for future sessions
-
Add Recipients
- Go to "π₯ Recipients" tab
- Import from CSV/TXT or enter manually
- Supported formats:
email@example.com email@example.com,John Doe email@example.com,John Doe,https://link.com id,email,QRCode_Image,Name # CSV with QR codes
-
Compose Email
- Go to "βοΈ Compose" tab
- Default template auto-loads with professional design
- Click "π Load Template" to reload default template
- Enter subject line (optional - auto-generated if empty)
- Write or edit HTML email content
- Use placeholders:
{{name}},{{link}},{{qrcode}} - Upload image attachment if needed
- Preview updates in real-time
- Customize
templates/default_template.htmlfor your brand
-
Send Campaign
- Go to "π Send" tab
- Review campaign summary
- Click "Start Campaign" to begin sending
- Monitor progress in real-time status log
id,email,QRCode_Image,Name
1,john@example.com,qrcodes/john_qr.png,John Doe
2,jane@example.com,qrcodes/jane_qr.png,Jane Smith- Header row is optional (auto-detected)
- QRCode_Image: path to QR code image file
- Images are dynamically attached per recipient
- Enable 2-Factor Authentication on your Google Account
- Generate an App Password:
- Go to Google Account Settings
- Security β 2-Step Verification β App passwords
- Generate password for "Mail"
- Use the App Password in the SMTP settings
- Outlook/Hotmail: smtp.office365.com, Port 587
- Yahoo: smtp.mail.yahoo.com, Port 587
- Custom: Contact your email provider for SMTP details
- SMTP credentials saved in
config/smtp_config.json - Auto-connect on application startup
- Connection status displayed in top toolbar
{{name}}- Replaced with recipient name{{link}}- Replaced with custom link per recipient{{qrcode}}- Replaced with attached QR code image
- Images embedded using CID (Content-ID) references
- No external hosting required
- All images sent with email
- If subject is empty, auto-generates: "Campaign - YYYY-MM-DD"
- Prevents sending errors
- Check SMTP server and port settings
- Verify email and password are correct
- For Gmail: Use App Password, not regular password
- Check firewall/antivirus settings
- Ensure SMTP connection is established (green dot indicator)
- Check recipient format is valid
- Verify email content is not empty
- Check SMTP provider's sending limits
- Ensure QR code image paths are correct
- Check file exists and is readable
- Supported formats: PNG, JPG, JPEG, GIF, BMP
- Business Logic:
app/config.py,app/email_sender.py,app/html_parser.py - UI Components:
app/ui/*.py - Styling:
app/ui/styles.py(centralized color scheme and TTK styles) - Tab System: All tabs inherit from
TabBasefor consistency
-
Add New Tab:
- Create new file in
app/ui/inheriting fromTabBase - Implement
create_widgets()method - Import and add to
main_window.py
- Create new file in
-
Modify Styles:
- Edit
app/ui/styles.py - Update color constants or TTK style configuration
- Edit
-
Add Email Features:
- Extend
EmailSenderclass inapp/email_sender.py - Update compose tab to support new features
- Extend
This project is provided as-is for educational and personal use.
Built with Python, Tkinter, and β€οΈ
For issues or questions, check the code comments or modify as needed for your use case.