subject="$1"
shift
( echo Subject: "$subject"
  echo To: ${1+"$@"}
  echo ''
  cat
) | QMAIL/bin/qmail-inject


syntax highlighted by Code2HTML, v. 0.9.1