title: Send HTML emails with inline images with ActionMailer
body: <p>I have a simple ActionMailer class like this:</p>
  
  <pre><code>class MyMailer &lt; ActionMailer::Base
    def mail(from, to, cc, bcc, subject, message, sent_at = Time.now)
      @subject = subject
      @recipients = to
      @from = from
      @cc = cc
      @bcc = bcc
      @sent_on = sent_at
      @body["message"] = message
      @headers = {}
    end
  end</code></pre>
  
  <p>And I ue it like this from a controller:</p>
  
  <pre><code>MyMailer.deliver_mail(mail.from, mail.to, mail.cc, mail.bcc, mail.subject, mail.message)</code></pre>
  
  <p>I prefer to keep it simple with no templates or such, and it is a webservice with no views.</p>
  
  <p>How do I change it to be able to send HTML mails with embedded images (in img tags i mean)? I need to attach the images woth the correct mime-type and also set the body with the correct mime-type, but how?</p>
  
  <p>Thank you</p>