title: Fetch imap body message by telnet
body: <p>I know that to get all message body, this is the command:</p>
  
  <pre><code>[imap_code] UID FETCH [uid] BODY.PEEK[TEXT]
  </code></pre>
  
  <p>Thus I get the entire message body.
  But I need to exclude the part of the attachments. I want only message wrote from sender, text and/or html.</p>
  
  <p>Is there a way?</p>
  
  <p>This is a full raw html mail with attachment</p>
  
  <p><a href="http://pastebin.com/FMEQdLM3" rel="nofollow">http://pastebin.com/FMEQdLM3</a></p>
  
  <p>I would like to get only</p>
  
  <pre><code>&lt;div dir="ltr"&gt;This is the message body&lt;div&gt;&lt;ul&gt;&lt;li&gt;one&lt;/li&gt;&lt;li&gt;two&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>or plain text if there isn't html version</p>