Friends,
os : linux
script : ksh
logfile: repot.html
mail : mailx
I'm trying to send HTML file as attachment via ksh script -> mailx command.
I can easily send text file as attachment but as soon as I change file to html, mailx doesn't recognize file and send email with html tags. I tried using uuencode, cat mailhtml etc.. various syntax which I got from internet but somehow nothing works.
I tried attaching html file manually to email and test whether my email client is having problem, but no attachment did sent/receive without any error.
I'm using below syntax, could somebody look and see what I'm missing? $report is a variable which stores html file name.
"
(cat mailhtml; uuencode report.html) | mailx -s "Monthly Report" manager@gmail.com < $report
"
Below works sending normal text logfile
mailx -s "Monthly Report" manager@gmail.com < $report
Thank you for looking into this and hopefully this can be achieved via mailx.