I have to print data of 2 tables ( which is output of sql query) one after another and send it in email ( using sendemail utility) of shell.
I have html code as below
echo "MIME-Version: 1.0"
#echo "Content-Type: multipart/alternative; "
echo "Content-Type: multipart/mixed;"
echo ' boundary="some.unique.value.ABC123/server.xyz.com"'
echo "Subject: "
echo ""
echo "This is a MIME-encapsulated message"
echo ""
echo "--some.unique.value.ABC123/server.xyz.com"
echo "Content-Type: text/html"
echo ""
echo "<html> <head> <style>table, th, td { border: 0.5px solid black;}</style><title>Some Title</title></head><body><table style=\"width:100%\" >"
echo "<tr><th>Col1</th><th>Col2/th><th>Col3</th><th>Col4</th></tr>"
cat mailbody
echo " "
echo "</body></html>"
echo "Some text here"
echo " "
echo "<html> <head> <style>table, th, td { border: 0.5px solid black;}</style><title>Some Title</title></head><body><table style=\"width:100%\" >"
echo "<tr><th>Col1</th><th>Col2/th><th>Col3</th><th>Col4</th></tr>"
cat mailbody2
echo " "
echo "</body></html>"
output should look like
But in actual the output is different
How can i achieve the expected output?