title: Receive an email with Actionmailer and read the plain body text
body: <p>I am using IMAP to receive some emails from gmail and then parse them with the new Rails 3 ActionMailer receive method.</p>
  
  <pre><code>raw_email   = imap.uid_fetch(uid, ['RFC822']).first.attr['RFC822']
  email = UserMailer.receive(raw_email)
  </code></pre>
  
  <p>email is now a Mail::Message Class and to:, :from and :subject works fine. However I can't figure out how to get the plain text from the body. Before Rails 3 I could use the <a href="http://github.com/sant0sk1/tmail_body_extractors" rel="nofollow">tmail_body_extractors</a> plugin to get the plain body. </p>
  
  <p>How would you do this with Rails 3?</p>
  
  <p>Jakobinsky:
  email.body.raw_source is a bit closer be still gives me a lot of garbage.</p>
  
  <blockquote>
    <p>"--001636310325efcc88049508323d\r\nContent-Type: text/plain;
    charset=ISO-8859-1\r\nContent-Transfer-Encoding:
    quoted-printable\r\n\r\nThis is some body
    content\r\n\r\n--=20\r\nVenlig Hilsen\r\nAsbj=F8rn
    Morell\r\n\r\n--001636310325efcc88049508323d\r\nContent-Type:
    text/html; charset=ISO-8859-1\r\nContent-Transfer-Encoding:
    quoted-printable\r\n\r\naf mail<br>-- <br>Venlig
    Hilsen<br>Asbj=F8rn
    Morell<br>\r\n\r\n--001636310325efcc88049508323d--"</p>
  </blockquote>
  
  <p>Should I roll my own helpers for cleaning up the raw_source or is there already a method ,gem or helper for that?</p>