Hi everyone !
First of all thanks for the great tool ! We now take it into use, as
the piloting had a really good feedback from users.
As we wanted to have possibility to send news to the users I created
this small bash script, which now I would like to offer you :)
It's light / simple / (may) lame, but working very well (at least for
my purposes).
It's absolutely free, please take it, change it, whatever, but don't
blame me for any problem :)
It's working only with mysql backend and only from localhost now (of
course could work from other host than your review board server, but
then you have to add server address to the mysql command line tool.
You need to have working emailing from the host.


The script:

#Setup these to meet with your setup

#Gathering email addresses from SQL
qry="SELECT email FROM auth_user"

#Sql password will be asked by the next line (because of -p)
emails=$(echo $qry | mysql -u $SQL_USR -p -B -N $DATABASE)

#Create a temp file for the email message

#Ask the user to provide a subject for the email
echo "Give a subject for the letter"
read sub

#Add extra before the subject ( you may change or remove this )
sub="[RB-NEWS] $sub"

#opening the editor to edit your message, you should have $EDITOR env.
variable. (no fork !)

#Let's spam!
echo "Sending emails..."
for i in $emails ; do
    cat $MSG_FILE | mail -s "$sub" $i
    if [ $? -eq 0 ] ; then
        echo "[OK] - $i"
        echo "[ !!! FAILED !!! ] - $i"
        #you may add exit here, I like to go along
    #you may add here some sleep, I don't need it.

#get rid of my trash
exit 0

Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to