#!/bin/ksh REPLYTO=Support@Proviss.com from=Proviss@GMail.com MailList="[List] drose@proviss.com" export REPLYTO from Attachments="" for File in $* # Attachments do test -s ${File} || continue Attachments=" $Attachments ${File}" done if [ "$Attachments" ] then Attachments="-a $Attachments --" fi { echo "\ This is a test. Attachments = ${Attachments} " } | mutt \ -e "unmy_hdr from; my_hdr From: ${REPLYTO}" \ -e "set realname='Proviss support' " \ -s "Mail test" ${Attachments} ${MailList} # End