title: linux mail < file.log has Content-Type: application/octet-stream (a noname attachment in Gmail)
body: <p>I've been using </p>
  
  <pre><code> mail -s "here is a log file" "person@example.com" &lt; log/logfile.log
  </code></pre>
  
  <p>Which used to come through with headers:</p>
  
  <pre><code>User-Agent: Heirloom mailx 12.4 7/29/08
  MIME-Version: 1.0
  Content-Type: text/plain; charset=us-ascii
  Content-Transfer-Encoding: 7bit
  </code></pre>
  
  <p>But now the files are longer I'm getting noname attachments because with this:</p>
  
  <pre><code>User-Agent: Heirloom mailx 12.4 7/29/08
  MIME-Version: 1.0
  Content-Type: application/octet-stream
  Content-Transfer-Encoding: base64
  </code></pre>
  
  <p>So if all else fails, check the manual <code>man mail</code> ...</p>
  
  <pre><code>NAME
         mailx - send and receive Internet mail
  
  SYNOPSIS
         mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops]
                [-A account] [-S variable[=value]] to-addr . . .
  </code></pre>
  
  <p>None of these options seem useful so how can I force <code>Content-Type: text/plain</code>?</p>