#!/bin/sh
# This is an example how to use an eventhandler with smsd.
echo smsd reports an event:
echo type: $1
echo file: $2
# $1 is the type of the event wich can be SENT, RECEIVED, FAILED or REPORT.
# $2 is the filename of the sms.

#This sends all received SMS to an email receiver:
if [[ $1 == RECEIVED ]]; then
  cat $2 | /usr/sbin/sendmail root@localhost;
fi;
