I have written code in html shell script but output is coming in mail with html body not tabular format.
Date=$(date -d '1 day ago'+%Y-%m-%d)(echo "To: bh8004@gmail.com"echo "CC: bh8004@gmail.com"echo "From: bh8004@gmail.com"echo "Subject: ABS metrics status"echo "Content-Type: text/html"#echo<!DOCTYPE html>echo "<html><head></head><body><table border='1'><tr><th><b>ACT</b></th><th colspan='2'><b>Date</b></th><th colspan='2'><b>Total #</b></th><th colspan='2'><b>Success </b></th><th colspan='2'><b>Timeout </b></th><th><b>Failed </b></th><th colspan='2'><b>In Prog</b></th></tr><tr><td>SWAP</td><td colspan='2'>$Date</td><td colspan='2'>$TRANS</td><td colspan='2'>$SUCCESS</td><td colspan='2'>$NTI_TIMEOUT</td><td colspan='2'>$NTI_FAILED</td><td colspan='2'>$INPROGRESS</td></tr><tr><td>I_SWAP</td><td colspan='2'>$Date</td><td colspan='2'>$I_TOTAL_TRANS</td><td colspan='2'>$SUCCESSED</td><td colspan='2'>$TIMEOUT</td><td colspan='2'>$FAILED</td><td colspan='2'>$INPROGRESS,$SUCCESS</td></tr><tr><td>T_SWAP</td><td colspan='2'>$Date</td><td colspan='2'>$T_TRANS</td><td colspan='2'>$SUCCESS</td><td colspan='2'>$TIMEOUT</td><td colspan='2'>$FAILED</td><td colspan='2'>$INPROGRESS</td></tr></table></body></html>"echo)| /usr/sbin/sendmail -t#/usr/local/bin/mailx -s "report" bh8004@gmail.com
I tried to get outptut in mail in tabular format but mail coming with html code not in table format in output in email, what is required here to put into it.