M='
cck@deneb.ucdavis.edu
cck@harpo.ucdavis.edu
kinmonthprep@deneb.ucdavis.edu
'
H='
==========
ehk
==========
leave messages for Kinmonth.
==========
'
case $1 in
	-h)		clear;echo "$H";exit 0;;
	-r)		more $PUBKIN/USAGE/*.msg;exit 0;;
esac
DATE=`date`
T=/usr/tmp/ehk$$.tmp
H='

this program leaves messages for Kinmonth. it calls vi for
a scratch file which you can edit to contain your message.
this file is then posted to a holding area.

answer questions with yes or no followed by a carriage return.

'
clear
echo "$H"
echo -n "continue (yes or no) "
read x
case $x in
	n*)	exit;;
esac
echo "continuing"
cat - > $T <<END
============================================================
add your message.  delete these instructions.  write and quit
vi (wq).
============================================================
FROM: $USER
DATE: $DATE
============================================================
your message goes here
============================================================
END
vi +1 $T
clear
echo -n "transmit message (yes or no) "
read x
case $X in
	n*)	rm -f $T;exit;;
esac
:
mail -s "from $USER" "$M" < $T
:
echo -n "mail me a copy of this message (yes or no) "
read x
case $x in
	n*)	;;
	y*)	mail -s "memo to ehk" $USER < $T;;
esac
:
lifo $T $PUBKIN/USAGE/$USER.msg
:
chmod 777 $PUBKIN/USAGE/$USER.msg
