title: php extracting text/plain from mail body
body: <p>this is the content of one mail read by imap_php library.
  I would extract the content-type text/plain; charset=ISO-8859-1 text:</p>
  
  <pre><code>{"data":"10/10/2011","regione":"pt","provincia":"pistoia","nome":"nome","tel":"12345","email":"mymailaddress","richiesta":"qualcosa"}
  </code></pre>
  
  <p>If I use imap_body($mbox, $result[0])  i have returned all the text in the box.
  If I use imap_fetchbody($mbox,$email_number,2);  I have returned the text/html body message that i don't want.</p>
  
  <blockquote>
    <p>--20cf301e2f27a218c204a88578aa Content-Type: text/plain;
    charset=ISO-8859-1 
    {"data":"10/10/2011","regione":"pt","provincia":"pistoia","nome":"nome","tel":"12345","email":"mymailaddress","richiesta":"qualcosa"}</p>
    
    <p>--20cf301e2f27a218c204a88578aa Content-Type: text/html;
    charset=ISO-8859-1 Content-Transfer-Encoding:  quoted-printable 
    {"data&amp;= quot;:"10/10/2011","regione":"pt","provi=
    ncia":"pistoia","nome":"nome","tel&amp;=
    quot;:"12345","email":"mymailaddress","r= ichiesta":"qualcosa"}
    --20cf301e2f27a218c204a88578aa--</p>
  </blockquote>
  
  <p>So what I have to use if I want the text/plain body? 
  Thanks.</p>