If you want to use the command line only for sending the filled ballot per email, there are a couple of helpers.
Let us assume, that you have got the ballot, filled it and saved as a vote.txt.
If it is acceptable for you yo send signed only message (not encrypted), use following snippets:
cat vote.txt | gpg --clearsign | mail email@example.com
cat vote.txt | gpg --clearsign | mail firstname.lastname@example.org
Signed and encrypted message
If you wish to encrypt the message, the public key which is attached to the ballot should be imported with
gpg --import public_key.asc
Then you can vote.
cat vote.txt | gpg --encrypt --armor -s -r email@example.com | mail firstname.lastname@example.org
cat vote.txt | gpg --encrypt --armor -s -r email@example.com | mail firstname.lastname@example.org
You can specify some more parameters to the mail such as “From:”-field and “reply-to” address:
... mail email@example.com -a "From: Max Mustermann <firstname.lastname@example.org>" -r email@example.com
Hope that helps.