A simple, secure email-based polling system that allows you to conduct polls by sending personalized voting links to recipients.
EazyPoll enables you to create polls where recipients vote by clicking links in emails. Each recipient receives a unique, secure token that prevents duplicate voting and ensures poll integrity.
- Secure Voting: Unique tokens prevent duplicate votes and maintain anonymity
- Email Integration: Automated email sending with customizable content
- Web-based Results: Real-time vote tracking and results display
- Flexible Configuration: Easy setup through configuration files
- Database Management: SQLite database for reliable data storage
- Vote Verification: Recipients can verify their vote was recorded correctly
- Setup: Add recipient emails to a text file and configure your settings
- Database Creation: Generate unique voting tokens for each recipient
- Email Distribution: Send personalized voting emails with Yes/No links
- Vote Collection: Recipients click their preferred option to cast votes
- Results Tracking: View real-time results and vote status
Create or edit config.ini:
[email]
smtp_server = smtp.your_server.com
smtp_port = 587
smtp_username = your_email@domain.com
smtp_password = your_password
smtp_from_name = Poll Administrator
[poll]
base_url = https://myserver/eazypoll/vote.php?token=
email_subject = Poll Question
question = Do you approve this proposal?
body_text = <p>We are seeking your input on an important matter.</p>
<p><strong>Please vote by clicking one of the options below:</strong></p>
[files]
recipients_file = recipients.txtCreate recipients.txt with one email address per line:
alice@example.com
bob@example.com
charlie@example.com
python create_poll_db.pyThis creates poll_database.db with unique tokens for each recipient.
python eazypoll.pyRecipients will receive emails with personalized voting links.
Transfer poll_database.db to your web server and access:
results.php- Anonymous vote overviewresults_email.php- Vote overview with email addressesmyresults.php- Individual vote confirmation page
create_poll_db.py- Initializes database with recipient tokenseazypoll.py- Sends poll emails to all recipientsshow_db.py- Displays current database contents
vote.php- Processes incoming votes and redirects to myresultsmyresults.php- Shows individual vote confirmation and totalsresults.php- Shows anonymous voting results and statisticsresults_email.php- Shows voting results with email addresses
config.ini- Main configuration (email, poll settings, file paths)recipients.txt- List of recipient email addressespoll_database.db- SQLite database (auto-generated)
- One Vote Per Token: Each recipient gets exactly one vote, this prevents re-using a token that is sniffed from the network. Also if the token is used before the intended recipient can use the token to vote, he of she will get an error and can inquire with the organizer what happened.
- Token Expiration: Tokens become invalid after voting
- Secure Links: Unique, non-guessable voting URLs
- Anonymous Options: Results can be displayed without email addresses
- Vote Verification: Recipients can confirm their vote was recorded
Modify the [poll] section in config.ini to customize:
- Poll question and description
- Email subject line
- HTML formatting in body text
The system defaults to Yes/No voting but can be easily modified in the PHP files to support multiple choice options.
Choose between anonymous results (results.php) or results with email addresses (results_email.php) based on your privacy requirements.
- Python 3.x
- SQLite3 (included with Python)
- Email server access (SMTP)
- PHP-enabled web server
- SQLite support in PHP
- Write permissions for database file
The polls table structure:
CREATE TABLE polls (
token TEXT PRIMARY KEY,
email TEXT,
vote TEXT,
voted_at DATETIME
);Database Already Exists
create_poll_db.pywill prompt before overwriting existing databases- Choose 'y' to recreate or 'n' to preserve existing data
Email Sending Fails
- Verify SMTP settings in
config.ini - Check email server authentication requirements
- Ensure firewall allows SMTP connections
Web Server Issues
- Confirm PHP has SQLite support enabled
- Check file permissions on
poll_database.db - Verify web server can read/write database file
This project is open source. Feel free to modify and distribute according to your needs.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.