compose.sh (431B)
1 #!/bin/bash 2 3 to="" 4 if [ $# -gt 0 ]; 5 then 6 to="$1" 7 fi 8 9 printf "Date: %s 10 From: %s 11 Subject: Subject 12 To: %s 13 Cc: 14 Bcc: 15 User-Agent: rohrpost 16 MIME-Version: 1.0 17 Content-Type: text/plain; charset=utf-8 18 Content-Transfer-Encoding: 8bit\n" "$(LC_ALL=C date "+%a, %d %b %Y %T %z")" \ 19 "$(rpcfg -v defaultfrom)" \ 20 "${to}" 21 [ -e "$HOME/.mailheaders" ] && cat "$HOME/.mailheaders" 22 printf "\nText\n" 23 [ -e $HOME/.signature ] && cat $HOME/.signature 24