I'm trying to setup a post-commit hook on SVN to send mail to a bunch of users using bash scripts. I have successfully setup the hook and it works when only one email address is specified. But when more email addresses are added no mail arrives. The bash scripts are as follows:
#!/bin/sh REPOS="$1" REV="$2" SENDTO="firstname.lastname@example.org, email@example.com" # Send it to these people, calling the script we created above /home/www/svn/bin/svn_email_commit.sh "$REPOS" "$REV" "$SENDTO"
#!/bin/bash REPOS=$1 REV=$2 SENDTO=$3 SENDFROMfirstname.lastname@example.org LIMITDIFF=200 # Do various other stuff and dump mail body to a temp file $TMPFILE... # Send email /bin/cat $TMPFILE | /bin/mail -s "$SUBJECT" "$SENDTO"
The problem is that /bin/cat $TMPFILE | /bin/mail -s "$SUBJECT" "$SENDTO" does not work if there are multiple $SENDTO addresses. It works when there is only one address.
I'm on CentOS 5.7