问题
I have a Scenario where i am having one .csv file called Studentdetails.csv
The student details has below following data
Ram,Mumbai,MBA
Viraj,Delhi,MCA
Vilas,Kolkata,MMS
Priya,Agra,BCA
My below code convert .csv file to html table format file
awk 'BEGIN{
FS=","
print "MIME-Version: 1.0"
print "Content-Type: text/html"
print "Content-Disposition: inline"
print "<HTML>""<TABLE border="1"><TH>Name</TH><TH>City</TH><TH>Course</TH>"
}
{
printf "<TR>"
for(i=1;i<=NF;i++)
printf "<TD>%s</TD>", $i
print "</TR>"
}
END{
print "</TABLE></BODY></HTML>"
}
' file-to-convert.csv > StudentDetails.html
But my issue is How do i Display this HTML Tabular format in Body of mail using mutt or mailx command
Note: Not as attachment
Output should be display in mail like below html tabular format
来源:https://stackoverflow.com/questions/58206219/how-to-display-html-tabular-data-in-email-body-using-mailx-or-mutt