initial working state
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user