#! /bin/sh
##
## vboxmail v2.0.0BETA4 ()

#----------------------------------------------------------------------------#
# Script to notify a user about new incoming voice message. This is only a   #
# *example* - you can modify it if you like!                                 #
#                                                                            #
# Usage: vboxmail MESSAGENAME CALLERNAME CALLERID MAIL-TO-ADDRESS            #
#----------------------------------------------------------------------------#

MSNAME="${1}"
CALLER="${2}"
CALLID="${3}"
MAILTO="${4}"

if (test -f "${MSNAME}")
then
   (
      /usr/bin/vboxmode $MSNAME

   ) | /usr/bin/mail -s "New message from ${CALLER} (${CALLID})" ${MAILTO}
fi
