send email using php wrapper

This commit is contained in:
Serghey Rodin 2013-10-08 00:22:43 +03:00
commit 8f03ce5e43
8 changed files with 41 additions and 8 deletions

View file

@ -34,7 +34,11 @@ if [ ! -z "$WEB_SYSTEM" ]; then
if [ "$?" -ne 0 ]; then
/etc/init.d/$WEB_SYSTEM restart >/dev/null 2>&1
if [ $? -ne 0 ]; then
send_mail="$VESTA/web/inc/mail-wrapper.php"
if [ -e "$VESTA/web/inc/mail-wrapper.php" ]; then
send_mail="$VESTA/web/inc/mail-wrapper.php"
else
send_mail=$(which mail)
fi
email=$(grep CONTACT $VESTA/data/users/admin/user.conf)
email=$(echo "$email" | cut -f 2 -d "'")
tmpfile=$(mktemp)