When I try to read a file and send email using cat and sendmail, the email I receive has additional spaces between the letters of words in the text.
My code:
export MAILTO="sa@y.com"
export SUBJECT="mydomain PREPROD MONITOR AT ${DATE}"
export BODY1="/usr/local/oracle/wls1036/domains/mydomain/bin/mydomainmonitor/mydomainmonitor.log"
(
echo "To: $MAILTO"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo "Content-Type:text/html"
echo "Content-Disposition: inline"
cat $BODY1
) | /usr/sbin/sendmail -i $MAILTO
Please let me know why these additional spaces are added. When I check the file I don't see any spaces in there.