#!/bin/sh
#	testmail recipient ...
#
# This script generates a simple test message and fires it off to the
# recipient(s); the idea is to simplify testing mail paths.

O=

for r
do	case "$r" in
	-*)	O="$O $r"
		;;
	*)
		echo "To: "$r
		{	echo 'Subject: Test message'
			echo 'To: '$r
			echo ' '
			echo "This is a test message, sent from "`hostname`'!'$USER
			echo 'to "'$r'"'
			echo ' '
		} |	Mail $O $r 
		;;
	esac
done
wait
