title: How to send HTML email using linux command line
body: <p>I need to send email with html format. I have only linux command line and command "mail".</p>
  
  <p>Currently have used:</p>
  
  <pre><code>echo "To: address@example.com" &gt; /var/www/report.csv
  echo "Subject: Subject" &gt;&gt; /var/www/report.csv
  echo "Content-Type: text/html; charset=\"us-ascii\"" &gt;&gt; /var/www/report.csv
  
  echo "&lt;html&gt;" &gt;&gt; /var/www/report.csv
  mysql -u ***** -p***** -H -e "select * from users LIMIT 20" dev &gt;&gt; /var/www/report.csv
  echo "&lt;/html&gt;" &gt;&gt; /var/www/report.csv
  
  mail -s "Built notification" address@example.com &lt; /var/www/report.csv
  </code></pre>
  
  <p>But in my mail-agent i get only plain/text.</p>
  
  <p><img src="https://lh5.ggpht.com/_nm3ymch9kZs/S7x1eIQcSBI/AAAAAAAABas/IS19BKKcqNI/mail.JPG" alt="alt text"></p>