title: How to setup send HTML email with mail gem?
body: <p>I am sending email using the Mail gem. Here's my code:</p>
  
  <pre><code>require 'mail'
  require 'net/smtp'
  
  Mail.defaults do
  
  delivery_method :smtp, { :address              =&gt; "smtp.arrakis.es",
                         :port                 =&gt; 587,
                         :domain               =&gt; 'webmail.arrakis.com',
                         :user_name            =&gt; 'myname@domain.com',
                         :password             =&gt; 'pass',
                         :authentication       =&gt; 'plain',
                         :enable_starttls_auto =&gt; true  }
  
  end
  
  Mail::ContentTypeField.new("text/html") #this doesnt work
  
  msgstr= File.read('text2.txt')
  
  list.each do |entity|
      begin
          Mail.deliver do
              from    'myname@domain.com'
              to      "#{entity}"
              subject 'a good subject'
              body   msgstr
          end
      rescue =&gt; e
      end
  
  end
  end
  </code></pre>
  
  <p>I don't know how to set up the content type, so that I can format my email as html for example. Though I actually just wish to be able to define bold text like my email client does: <strong>bold text</strong>. Does anybody know which content-type I need to specify in order to achieve this, and how to implement it with mail?</p>
  
  <p>Just a note, the code above works fine for sending plain text email.</p>