A tiny, standalone CLI companion to the SiVote platform. It lets an election commission send voting invites from their own computer, so the central voting server never learns which voter received which code — the strongest secrecy posture (an alternative to the hosted SiVote Sender). You generate the single-use codes on the SiVote Engine, then distribute them locally over your own SMTP with these scripts. No framework, no cloud.
-
Install PHP
-
Install Composer
-
Install dependencies
composer install -
Copy and configure config file
cp config.ini.example config.ini
-
Create your email template file
-
Add your email list (as text file with one email per line)
-
Determine total number of voters
-
Download the same number of codes as voters from the online system
-
Run script to send emails
php sendInvitesToEmails.php --email=email_list.csv --codes=codes_list.csv --count=400 --template=ballot.txt --subject="Ballot"
Because sometimes emails do not arrive you may wish to hold on to the map between codes email emails for a short time to confirm everyone got their emails.
To do this use sendInvitesToEmailsWithCache.php with the same arguments as described in Basic Usage.
This will generate a SENSITIVE_MAPPED_CODES_date.csv file.
If someone does not receive the email you may resend it with
php resendFromCache.php --cache_file=CACHE_FILE.csv --email=name@example.org --template=ballot.txt --subject="Ballot"
If the email still does not arrive you may wish to forward the code/link combination to the voter in another manor (for example via SMS or encrypted chat app).
This requires the voter to give permission to a member of the voting commission to learn of the voters code as sending it will require seeing it.
If the voter consents you can find the code&link by using
php getCodeForEmail.php --cache_file=CACHE_FILE.csv --email=name@example.org
This will give you the code&link for the voter without the need to browse the file, seeing other code/email combinations.
This information can then be sent to the affected voter.
The SENSITIVE_MAPPED_CODES_*.csv file links codes to emails. Keep it only as long as needed to
confirm delivery, store it on the local machine only, and delete it afterwards — its whole point is that
this mapping never reaches the server.
MIT — see LICENSE. Bundles PHPMailer under LGPL-2.1; see NOTICE. Feedback & support: info@ip21.si