initial working state
This commit is contained in:
3
mailing/emails.txt
Normal file
3
mailing/emails.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
an.address@domain.net
|
||||
other.address@domain.net
|
||||
|
||||
17
mailing/send_tokens.sh
Executable file
17
mailing/send_tokens.sh
Executable 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
|
||||
9
mailing/template.txt
Normal file
9
mailing/template.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Dear Recipient,
|
||||
|
||||
You have been sent an invitation to vote at an anonymous voting event:
|
||||
|
||||
{{ url }}
|
||||
|
||||
Thank you for voting!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user