#!/bin/sh

if [ ! -f "$D"/emaillen.out ]
then
  echo "You must run test 33 before this test." 1>&2
  exit 1
fi

emaillen=`cat "$D"/emaillen.out`
if [ -z "$emaillen" ]
then
  echo "You must run test 33 succesfully before this test." 1>&2
  exit 1
fi

if [ "$emaillen" -eq 0 ]
then
  echo "Email not supported." 1>&2
  exit 111
fi

if ! ./startalk $TESTOPTS -w <<EOF
position: $TESTENTRY
name: Test User
company: Test Comp.
phone-home: 0123456789
email: sgifford@suspectclass.com

EOF
then
  exit $?
fi

./startalk $TESTOPTS -n $TESTENTRY -r
exit $?
