title: How to send HTML file using mailx?
body: <p>Friends,</p>
  
  <p>os     : linux</p>
  
  <p>script : ksh</p>
  
  <p>logfile: repot.html</p>
  
  <p>mail   : mailx</p>
  
  <p>I'm trying to send HTML file as attachment via ksh script -> mailx command.</p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>I'm using below syntax, could somebody look and see what I'm missing?
  $report is a variable which stores html file name.</p>
  
  <pre><code>"
  (cat mailhtml; uuencode report.html) | mailx -s "Monthly Report" manager@gmail.com &lt; $report
  "
  </code></pre>
  
  <p>Below works sending normal text logfile</p>
  
  <pre><code>mailx -s "Monthly Report" manager@gmail.com &lt; $report
  </code></pre>
  
  <p>Thank you for looking into this and hopefully this can be achieved via mailx.</p>