title: Mailx send html message
body: <p>I want to send a html message with Mailx. When I try the following command</p>
  
  <pre><code>mailx -s "Subject"  user@gmail.com  &lt; email.html 
  </code></pre>
  
  <p>I get the content of email.html in plain text. In the message the header Content-Type is set to text/plain. The -a option tries to send a file so I didn't find out how to modify the header. This <a href="https://stackoverflow.com/questions/22457922/linux-mail-adding-content-type-headers-not-working">answer</a> almost worked, it sets well the Content-Type to text/html but doesn't substitute the default Content-Type which is text/plain. </p>
  
  <pre><code>mailx -s "$(echo -e "This is the subject\nContent-Type: text/html")" user@gmail.com  &lt; email.html
  </code></pre>
  
  <p>gives this result :</p>
  
  <pre><code>From: send@gmail.com
  To: user@gmail.com
  Subject: This is the subject
  Content-Type: text/html
  Message-ID: &lt;538d7b66.Xs0x9HsxnJKUFWuI%maikeul06@gmail.com&gt;
  User-Agent: Heirloom mailx 12.4 7/29/08
  MIME-Version: 1.0
   boundary="=_538d7b66.z5gaIQnlwb1f/AOkuuC+GwF1evCaG/XIHQMbMMxbY6satTjK"
  
  This is a multi-part message in MIME format.
  
  --=_538d7b66.z5gaIQnlwb1f/AOkuuC+GwF1evCaG/XIHQMbMMxbY6satTjK
  Content-Type: text/plain; charset=us-ascii
  Content-Transfer-Encoding: 7bit
  Content-Disposition: inline
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;p&gt;Helo wolrd&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>PS : I also tried with uuencode. When I try to display the message in the webmail I get a blank page...</p>