initial working state

This commit is contained in:
Ville Rantanen
2018-12-02 23:11:32 +02:00
commit 083915e69a
23 changed files with 837 additions and 0 deletions

17
mailing/send_tokens.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
[[ -z "$2" ]] && {
echo "$0 email_list.txt template.txt"
exit
}
set -x
prefix=http://localhost:8041
reply=no.reply@localhost
addresses=$( grep @ "$1" | wc -l )
i=1
../manager token multi_question -n $addresses --prefix $prefix | while read url; do
address=$( grep @ "$1" | sed "${i}q;d" )
cat "$2" | sed "s,{{ url }},$url," | mail -r $reply -s "Invitation to vote" "$address"
sleep 3
i=$(( i + 1 ))
done