I want to send the content in same format as it is in file.
Code:
#!/bin/sh
cat /usr/test/abc > /usr/test/abc/file
if [ -s /usr/test/abc/file ]
then
MAILTO=test@yahoo.com
CONTENT="/usr/test/abc/file"
(
echo "Subject: TEST "
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
cat $CONTENT
) | /usr/sbin/sendmail -t $MAILTO
else
echo "bbb"
fi