Wednesday, 7 October 2015

How to send mail using sender name

#!/bin/ksh
SendTo=achintam@domain.com
SendFrom=Linga\<lavula@domain.com\>
cat /dev/null >/tmp/test.txt
TESTF=/tmp/test.txt
echo "To: $SendTo" >>$TESTF
echo "From: $SendFrom" >>$TESTF
echo "Subject: Testing" >>$TESTF
/usr/sbin/sendmail $SendTo <$TESTF
exit

No comments:

Post a Comment