title: Ruby Mail Gem. Send email body with monospace font style
body: <p>I'm using the Ruby Mail Gem to send emails from a couple of scripts that mainly takes the output of an application and send the output in the body of the email and as an attachment also.</p>
  
  <p>The thing is that in the body, the default font is not fixed size or monospaced and the text shows garbled to see it correctly.</p>
  
  <p>This is the configuration I use:</p>
  
  <pre><code>@mail = Mail.new do
    body File.read('log.txt')
  end
  @mail['from']  = 'from@account.com'
  @mail[:to]     = 'to@account.tv'
  @mail.subject  = "Casos automáticos: Resultado #{@date_string} - #{ARGV[0]} - #{ARGV[1]} - #{ARGV[2]}"
  @mail.add_file 'log.txt'
  @mail.deliver!
  </code></pre>
  
  <p>I just tried with this settings with no impact on the font of the body:</p>
  
  <pre><code>@mail.header['X-Custom-Header'] = '&lt;body style="font: monospace"&gt;'
  @mail.charset = 'UTF-8'
  @mail.content_transfer_encoding = '8bit'
  </code></pre>