#!/bin/sh
#	Post file...
#

for f
do	case "$f" in
	-*)	OPTS="$OPTS $f";
		;;
	*)	grep '^To:' $f \
		|	sed -e 's/^To://' -e 's/,/ /g' -e 's/".*"//g' >/tmp/Post$$
		grep '^Cc:' $f \
		|	sed -e 's/^Cc://' -e 's/,/ /g' -e 's/".*"//g'>>/tmp/Post$$
		if [ -s /tmp/Post$$ ];then
			Mail $OPTS `cat /tmp/Post$$` <$f
		else
			echo ### $f contains no To: or Cc: line.
		fi
		;;
	esac
done
#rm -f /tmp/Post$$
