#!/bin/sh # # Send mail with SEN_850200_C (ISO646-SE2) character set # trap 'rm -f $tmpfile; exit' 0 1 2 3 13 15 tmpfile=$(mktemp ~/.semail.XXXXXX) || exit 1 if [ $# -eq 0 ]; then printf "To: " read to else to="$1" fi printf "Subject: " read subject cat <$tmpfile To: $to Subject: $subject Content-type: text/plain; charset=sen_850200_c Content-Transfer-Encoding: 7bit ! case "$EDITOR" in *vi) echo >>$tmpfile; $EDITOR +6 $tmpfile;; *) $EDITOR $tmpfile;; esac sendmail $to <$tmpfile .