title: Sending mail Body and attachment using mailx - Linux
body: <pre><code>mailx -a 'Content-Type: text/html' \
        -s &quot;Body&quot; \
    &lt; index.html &quot;foo@example.com&quot;
  </code></pre>
  <p>I'm trying to send an email using a <code>mailx</code> command line. The above command is working fine to send body as html file.<br />
  But along with it I also want to send an attachment.
  Is it possible to send an attachment and body as a file together?
  How to do it?</p>