#!/bin/bash

# called with this:
# xmitemail "Hello" "steev@workaddress.com" "I bet you didn't think this would work!"

SUBJECT=$1; shift
TOADDR=$1; shift
MSG=$*

echo "$MSG" | mail -s "$SUBJECT" "$TOADDR"

