Report abuse


			
email = TMail::Mail.parse(mail)
if email.multipart?
  email.parts.each { |part|
    if part.content_type == 'text/plain'
      if part.content_transfer_encoding == 'quoted-printable'
        return part.unquoted_body('ISO-8859-1')
      else
        return part.body('ISO-8859-1')
      end
    end
  }
end